加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

vim – Ctrl X不按指定的数量减少数量

发布时间:2020-12-15 21:16:56 所属栏目:安全 来源:网络整理
导读:我有以下文字: Foo bar 15 test. 我的光标位于行开头的F上,我处于正常模式.我想减少15乘10,所以我的行读起来像这样: Foo bar 5 test. 因此,我应该在不移动光标的情况下输入10然后按住Control并输入x.然而,这只是将我的数字减少1,而不是10. 是否有可能添加v
我有以下文字:

Foo bar 15 test.

我的光标位于行开头的F上,我处于正常模式.我想减少15乘10,所以我的行读起来像这样:

Foo bar 5 test.

因此,我应该在不移动光标的情况下输入10然后按住Control并输入x.然而,这只是将我的数字减少1,而不是10.

是否有可能添加vim需要能够执行此操作,或者我是否需要更改vim中的设置才能使其正常工作.我正在使用vim而不通过Putty在Ubuntu 12.04服务器上运行GUI.

我的vim版本如下:

:version VIM – Vi IMproved 7.3 (2010 Aug 15,compiled May 4 2012
04:09:27) Included patches: 1-429 Modified by
pkg-vim-maintainers@lists.alioth.debian.org 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

谢谢

解决方法

你可能在兼容模式下运行Vim.

命令

:set nocompatible

将Vim置于非兼容模式并神奇地启用vi中不存在的各种有用功能,包括使用带CtrlA和CtrlX的计数.

如果您始终希望以非兼容模式启动Vim(强烈建议),请在主目录中使用以下内容创建基本vimrc文件.

set nocompatible
filetype plugin indent on

如果您是Vim的新手,并且不知道vimrc文件是什么,请阅读:h vimrc-intro帮助中的介绍.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读