Monday, January 30, 2012

Re: set a mark in an arbitrary file

Am Montag, 30. Januar 2012 10:39:06 UTC+1 schrieb Samuel Ferencik:
I keep losing my (uppercase) marks, and would like to set them up in
my .vimrc. I'd do this using setpos(), but that requires a buffer
number. I want to call something like setpos("'A", ['filename.c', 1,
1, 0]).

I guess you could add the buffer to the arguments list. A buffer will then be created but not loaded.

argadd filename.c
call setpos("'A", [bufnr('filename.c'), 1, 1, 0])

HTH
Tom

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment