While CtrlX works fine in vim under windows, CtrlA selects all (duh).
Is there a way to increment a number with a keystroke under windows?
If you use Vim under screen , press Ctrl-A and then hit a . Screen then sends on a translation of Ctrl-A to the underlying program, Vim.
You can make CtrlA to increment in windows by opening up the 'mswin.vim' file in your vim directory and finding the section that looks like:
" CTRL-A is Select all noremap <C-A> gggH<C-O>G inoremap <C-A> <C-O>gg<C-O>gH<C-O>G cnoremap <C-A> <C-C>gggH<C-O>G onoremap <C-A> <C-C>gggH<C-O>G snoremap <C-A> <C-C>gggH<C-O>G xnoremap <C-A> <C-C>ggVG
Comment out all of these lines as follows:
" CTRL-A is Select all "noremap <C-A> gggH<C-O>G "inoremap <C-A> <C-O>gg<C-O>gH<C-O>G "cnoremap <C-A> <C-C>gggH<C-O>G "onoremap <C-A> <C-C>gggH<C-O>G "snoremap <C-A> <C-C>gggH<C-O>G "xnoremap <C-A> <C-C>ggVG
and the CtrlA keystroke will increment.
This is a pretty nice option when your keyboard doesn't have a real number pad.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With