vim的配置指令

自己常用的指令/etc/vim/vimrc下添加如下

set nu

set incsearch
set showmatch
syntax on
set hlsearch
set ignorecase
set cursorline
set ruler
set nobackup
colorscheme default
"总是显示状态栏
set laststatus=2      
"状态栏属性
highlight StatusLine cterm=bold ctermfg=yellow ctermbg=blue
" 获取当前路径,将$HOME转化为~
  function! CurDir()
    let curdir = substitute(getcwd(), $HOME, "~", "g")
    return curdir
  endfunction
set statusline=[%n]\ %f%m%r%h\ \|\ \ pwd:\ %{CurDir()}\ \ \|%=\|\ %l/%L,%c\ %p%%\ \|\ ascii=%b,hex=%b%{((&fenc==\"\")?\"\":\"\ \|\     \".&fenc)}\ \|\ %{$USER}\ @\ %{hostname()}\

你可能感兴趣的:(Linux,Andriod)