New answers tagged

1 vote
Accepted

is there a way to drop in my netrw location info into my jumplist

Create a file in the location ~/vim/after/ftplugin/netrw.vim with the contents: augroup NetrwJumplist autocmd! * <buffer> autocmd BufLeave <buffer> normal! m' augroup END This will ...
Rich's user avatar
  • 31.9k
1 vote

Why does ":normal gv" keep removing one line from my visual block?

The call :'<,'>call F() (which you get from visual mode) runs F on each line unless F has range. So you’re invoking normal gv on each line. I can’t explain the result you got, but that seems ...
D. Ben Knoble's user avatar
  • 26.2k
1 vote
Accepted

Renumbering in Vim: g<C-A> won't work in vimscript function

To renumber till the end of the buffer I would do: :normal! VGg^A Where ^A is inserted using Ctrl va Or :execute "normal! VGg\<C-a>" If you want to trigger it from an existing ...
Vivian De Smedt's user avatar
1 vote
Accepted

Why does ":normal gv" keep removing one line from my visual block?

:normal gv in visual mode becomes :'<,'>normal gv which runs it for every line in selection. Now why it ends up with a selection 1 line less, I am not sure about, but I think it is related to gv ...
Maxim Kim's user avatar
  • 13.4k
0 votes

How to use TexMathZones in Markdown Syntax, for Snippets?

I use the following math() context definition in vimwiki.snippet. This only works if your cursor is in a fully paired $ math delimiter. But putting a fully paired $ and letting the cursor be between ...
Iris's user avatar
  • 13
0 votes
Accepted

if endif oneliner failure in VIM

The issue is within echo(w) as it can't figure out where is the end of the command. A workaround is to wrap it with execute: if v:false | exe 'echow "g:mode_class "' | else | exe 'echo "...
Maxim Kim's user avatar
  • 13.4k

Top 50 recent answers are included