lili对《Hacking Vim 7.2》的笔记(1)

lili
lili (Hacking)

读过 Hacking Vim 7.2

Hacking Vim 7.2
  • 书名: Hacking Vim 7.2
  • 作者: Kim Schulz
  • 副标题: Ready-to-use hacks with solutions for common situations encountered by users of the Vim editor
  • 页数: 244
  • 出版社: Packt Publishing
  • 出版年: 2010-4-29
  • 第17页
    [command]
    1.Show me where is my VIM location [:echo $VIM] (in normal mode)
    2.Show me what vim consider as the home directory [:echo $home]
    3.Show me where is my personal vimrc/gvimrc file [:echo $MYVIMRC]/[:echo
    $MYGVIMRC]
    4.vimrc文件可以使用其他别的文件来配置。 用[source]命令来引入其他文件。这样可以时vimcr文件保持整洁。
    5.the exrc configuration file that is only used for backwards compatibility with the old vi/ex editor.
    6.Changing the fonts
    In VIm there is not much to do when it comes to changing the font bucause the font follows one of the terminals. In Gvim you can changing it.
    In Linux [:set guifont=font-name\ font-size] 如[:set guifont=Courier \14]
    In Windows [:set guifont=font-name:font-size]
    可同时设定多个字体,只要把他用逗号分开即可,如果字体的名字包含空格要用转移字符转意。如[:set guifont=Courier\ New\12, Arial\ 10] 在配置文件中写入的时候不用set前的冒号。键入[help guifont] 得到更多有关设置字体的信息。
    7.显示可用的字体[:set guifont=*]
    8.为不同的文件设置不同的字体 [autocmd BufEnter *.txt set guifont=Arial\ 12]
    9.Changing color scheme
    颜色配置文件通常都在一个叫做colors的文件中。设置颜色方案用[:colorscheme colorscheme-name] 。查看当前的颜色方案[:echo g:colors_name].
    10.要写颜色方案的话可以看 $VIMRUNTIME/colors/README.txt
    11.highlighting
    In Vim, the feature of highlighting things is called matching.
    2011-06-04 00:12:35 1人喜欢 回应