一般情狀下,進入vim 後是不會顯示出行數
如要此功能需要在 vim command 內下 :set nu! 方可
但這樣使用有點麻煩,如要讓每次都顯示則需修改 /etc/vim/vimrc 設定檔

vim /etc/vim/vimrc

在紅色的地方加上"set nu "  就可以

 
 35 " plugins.
     36 "if has("autocmd")
     37 "  filetype indent on
     38 "endif
     39
     40 " The following are commented out as they cause vim to behave a lot
     41 " differently from regular Vi. They are highly recommended though.
     42 "set showcmd            " Show (partial) command in status line.
     43 "set showmatch          " Show matching brackets.
     44 "set ignorecase         " Do case insensitive matching
     45 "set smartcase          " Do smart case matching
     46 "set incsearch          " Incremental search
     47 "set autowrite          " Automatically save before commands like :next         and :make
     48 "set hidden             " Hide buffers when they are abandoned
     49 "set mouse=a            " Enable mouse usage (all modes) in terminals
     50 "set nu "
     51 " Source a global configuration file if available
     52 " XXX Deprecated, please move your changes here in /etc/vim/vimrc
     53 if filereadable("/etc/vim/vimrc.local")
     54   source /etc/vim/vimrc.local
     55 endif
     56 set nu
arrow
arrow
    全站熱搜

    Felix 發表在 痞客邦 留言(0) 人氣()