单击Esc来确定你处于正常模式,接着输入:set number并键入回车。 瞧!你现在可以在每一行的左侧看到行号。 Showing Line Numbers 好,你也许会说,“这确实很酷,不过我该怎么跳到某一行呢?”再一次的,确认你正处于正常模式。接着输入:<LINE_NUMBER>,在这里<LINE_NUMBER>是你想去的那一行的行数。按下回车键来试...
(Fig.01: Vi / Vim line numbers in action - click to enlarge image) To turn off line number again enter the same command: :set nonumber or :set nu! If you need number every time you start vi/vim, append following line to your ~/.vimrc file: set number In OSX, edit the vim co...
set number "显示行数Enable line numbers 8. 状态栏显示信息设置 set laststatus=2"显示状态栏 set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\(line\%l\/%L,\ col\%c)"上面的状态栏展示信息比较多,,可以如上所示进行集合性配置,如果懒得一一理解,可直接复制进配置文件,因为所有配置对于提升你编程效率都有...
set nocompatible "Turn off compatibility mode with Vi set number "Show Line Numbers set nowrap "No automatic folding set showmatch "Display matching parentheses set encoding=utf-8 set fenc=utf-8 set mouse=a "To enable the mouse set hlsearch "Search highlight syntax enable "Syntax highlighting s...
set number Save and close the file. Tip: Open a file at particular location/line number Jump to particular line number from a shell prompt, enter: $vi+linenumberfile.c $vi+300initlib.c Jump to particular line that contains main() function from a shell prompt, enter: ...
set showcmd " Show (partial) command in status line. set number " Show line numbers. set showmatch " When a bracket is inserted, briefly jump to the matching " one. The jump is only done if the match can be seen on the " screen. The time to show the match can be set with ...
set num- Sets the line numbers. set paste- Pastes a bulk of text from some other location. To move forward and backward for one fullscreen: Ctrl+f- moves forward by fullscreen. Ctrl+b- moves backward by fullscreen. Intermediate commands ...
在vim中,可以通过使用命令模式下的:set number来显示行号。这将在每一行的前面显示行号。如果想要删除一行并记录行号,可以按照以下步骤操作: 进入vim编辑器并打开文件。 使用j或k键移动光标到要删除的行。 在命令模式下输入dd命令来删除当前行。 按下:进入命令模式。 输入set number来启用行号显示。 按下Enter确认...
let g:NERDTreeShowLineNumbers=1 let g:NERDTreeQuitOnOpen=1 " cscope.vim if has("cscope") set csto=1 set cst set nocsverb if filereadable("cscope.out") cs add cscope.out endif set csverb endif " OmniCppComplete.vim let g:OmniCpp_DefaultNamespaces=["std"] ...
" turn absolute line numbers on :set number :set nu " turn absolute line numbers off :set nonumber :set nonu " toggle absolute line numbers :set number! :set nu! Besides being useful for finding a line from a stack trace or a test result, you can use line numbers to help you ju...