Home » , » VIM

VIM


how to copy using vim

  • press ESCAPE to change into command mode
  • put cursor on the beginning of textblock you want to copy
  • press v (vim will enter VISUAL mode)
  • move cursor to the end of textblock
  • press 'y' to copy (or 'x' for cut operation)
  • move cursor to the place you want to paste the text, then press 'p'

[edit]Color highlight in VIM

When in vim, try this:

Type : to get a command line,

Type 'runtime syntax/colortest.vim' to make sure you do in fact have the ability to display color from the server. (I know you said it did, but just to be sure! )

If the above worked, try editing the .vimrc file in your home directory to include the following lines: Code:
" Set syntax highlighting to always on
syntax enable

" Set the background to dark and the colorscheme to murphy
set background=dark
colorscheme murphy

" Set automatic filetype detection to on
filetype on
That should at least get you some color. You certainly don't have to keep the murphy colorscheme...I just included that bit so you'd have a color scheme to start with.

[edit]vim中文乱码的解决

  $vi ~/.vimrc
  let &termencoding=&encoding
  set fileencodings=utf-8,gbk
  $:wq

[edit]display special character

set list
set ff

Popular Posts