I have the following line of text:
Foo bar 15 test.
My cursor is on the F at the start of the line, and I am in normal mode. I want to decrement 15 by 10, so my line reads like so:
Foo bar 5 test.
Apparantly, I should therefore, without moving my cursor, be able to type 10
and then hold down Control
and type x
. This is however only decrementing my number by 1, as opposed to 10.
Is there maybe an add on that vim needs to be able to do this, or do I need to change a setting in vim for this to work. I am using vim without the GUI running on Ubuntu 12.04 Server via Putty.
My version of vim is as follows:
:version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:09:27) Included patches: 1-429 Modified by [email protected] Compiled by buildd@ Huge version without GUI. Features included (+) or not (-): +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg +path_extra -perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H
-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O 1 -Wl,-Bsymbolic-functions
Thanks
5
withx
? What happens when you do10<C-A>
instead? – gltsA
as opposed tox
I increment by one. It works properly when my cursor is actually on the number, but my understanding is that this should work even if my cursor is at the start of the line, is this correct? – JMK<C-A>
/<C-X>
. Upgrade to a proper Vim. – glts:set compatible?
say? If it'scompatible
, do:set nocp
and try10<C-X>
again. – glts