vim配置

来源:互联网 发布:crm软件在线试用 编辑:程序博客网 时间:2024/06/07 15:21

set nu

set showmatch    高亮显示括号匹配

set shiftwidth=4    设置自动缩进为4个字符

set guifont=Monospace\ 13       设置字体为Monospace及大小为13

colorscheme desert  设置配色方案

syntax enable  启用语法高亮功能

syntax on  开启语法高亮

set cindent  设置C/C++自动缩进模式

set list   显示隐藏字符

set listchars=tab:>-;trail:-    将显示的隐藏字符中制表符变为>-并将换行变成-

 

 

 

高亮显示当前行-----好用漂亮:-)




上面是效果图,第96行为当前行,设置为红色。

具体设置为:
set cursorline
hi CursorLine  cterm=NONE   ctermbg=darkred ctermfg=white
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white

 set mouse=a    #支持鼠标

9down vote

If you are using vim >=7.3.74, then you can actually put this in your vimrc:

set clipboard=unnamedplus

Which will automatically use the + buffer (the system clipboard) by default. Then to yank (copy), you just use the regulary command, etc.

I found this behavior to be fairly annoying, though, as commands like d put the text they operate on into the default buffer, which meant I couldn't do a fastdd and paste a line from the internet, for example.

 

注:

      在vim中所有的复制,删除,剪切都是先通过在视图模式下先选中文本区域再复制该文本内容到"+寄存器,这样可以很方便的同各种程序共享"+寄存器中的数据。 因为"+寄存器是系统共用的。

 

原创粉丝点击