vim note(5)

.vimrc 的设置

$HOME/.vimrc 的普通设置,例如以下。

set nocompatible  "" not compatible with VI

"" Encodings and fonts
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set langmenu=zh_CN.UTF-8
language messages zh_CN.UTF-8
set guifontset=wenquanyi,-*-16-*-*-*

"" Tab and Backspace
set sw=2
set tabstop=4
set shiftwidth=4
set cindent
set smartindent
set autoindent
set backspace=indent,eol,start  "" set backspace

"" Display
set number        "" show line number
set ruler         "" always show current position
set cursorline    "" highlight the current line
set showcmd

"" Searching
set ignorecase    "" search setting
set incsearch
set hlsearch
set showmatch
set history=100
highlight Search term=reverse ctermbg=4 ctermfg=7

"" Syntax and color scheme
syntax enable
filetype plugin indent on
"colorscheme torte
colorscheme default
highlight Comment ctermfg=grey
highlight Normal ctermfg=grey ctermbg=darkblue

"""""""""" 自己主动补全命令 """"""""""
autocmd Filetype c      set omnifunc=ccomplete#Complete
autocmd Filetype html   set omnifunc=htmlcomplete#CompleteTags
autocmd Filetype xml    set omnifunc=xmlcomplete#CompleteTags
autocmd Filetype python set omnifunc=pythoncomplete#CompleteTags
autocmd Filetype tex    set omnifunc=syntaxcomplete#Complete

"""""""""" 英文拼写检查 """""""""""
" 拼写错误被画红线,比缺省设置更美观 "
""""""""""""""""""""""""""""""""""
set spell spelllang=en_us
setlocal spell spelllang=en_us
highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline

"""""""""""" END """"""""""""					
时间: 2025-01-23 12:00:43

vim note(5)的相关文章

vim note (1)

'vim' go into the vim mode 'i' 'a' 's'    is means insert mode 'v' is means visual mode 'esc' is means back to normal mode j down k up h left l right

vim note

2016-1-22 vim plugin collections: (参考 https://www.youtube.com/watch?v=0QFR-_wUoA0) vim-pathogen  插件管理工具 vim-powerline 漂亮的底部状态列 SelectColors 颜色主题选择 snipmate  自动生成样式代码 vim-css-color  颜色相关的代码展示出对应的颜色 surround  改变word外面的字符,比如把“screen”换成‘screen’ vim-inden

vim note(3)

Ctrl+w  Ctrl+v  will create a new window on the right side of the current window Ctrl+w  Ctrl+s   will create a new window on the down side of the current window (Ctrl+w)^2       press twice, go to the other window (g)^2 beginning of the page (G)^2 a

vim note write

Try: :vert sb N which will open a left vertical split (by default, unless you have modified some options). To open a split to the right, on the other hand: :vert belowright sb N You can use :split and :vsplit to divide the current area into two windo

Vim基础教程

一.简介 世界上只有三种编辑器,EMACS.VIM和其它. 我们所处的时代是非常幸运的,有越来越多的编辑器,相对于古老的VIM和EMACS,它们被称为现代编辑器.我们来看看这两个古董有多大年纪了: **EMACS** : 1975 ~ 2013 = 38岁 **VI** : 1976 ~ 2013 = 37岁 **VIM** : 1991 ~ 2013 = 22岁 简单列举一下程序员期望使用的编辑拥有的功能: 轻量级,迅速启动(相对于IDE) 语法高亮 自动对齐 代码折叠 自动补全 显示行号 重

常用Ex命令小结(待更新)

在参考Learning the vi and Vim Editor的时候发现ex编辑器作为vi的父类, 对于我们深入理解vi和vi的clones的前世今生有很大的帮助, 有必要单独出一个文档来介绍一些常见常用的指令. $ex practice 在Unix下使用ex editor叫档. 显示结果: "practice" 6 lines, 320 characters : 显示该文件的行数,多少个字符.停止在:冒号命令提示符. p 打印到屏幕, 1p 打印第1行到屏幕, 可以去掉p, 因为

002_tmux详解

一. 二. 今天试用了一下 tmux,发现简直是神器!以前还傻傻不停开窗口,现在一个窗口就可以都搞定啦! Tmux 简单来说就是终端里的『窗口管理器』,如果我使用终端登录到远程主机并运行前台程序,那么这个窗口等于就被占用了,想要看一下 CPU 的使用率,就得再连接一次.但是如果在远程主机上运行 tmux,那么就可以开启多个控制台(类似于窗口),相当高效,比方说可以像下面这样: 需要注意的是,这里是在我本地使用 tmux,最好在远程主机也安装 tmux,这样就只需要连接一次. Hello Worl

Win7下安装配置gVim

本文根据vim官网的<Simple Steps to Help You Install gVim on Windows 7>[1]一文整理而成. 1. 下载gVim 在http://www.vim.org/download.php/pc 下找到“PC: MS-DOS and MS-Windows”,下载“gvim74.exe”[2]. 2. 安装gVim 1. 安装时可以选择更改目录(文中在 Users/用户名 下面新建了一个目录Vim,将gVim安装在了该目录下). 2. 安装时注意选择‘F

A Cross-Platform Memory Leak Detector

Memory leakage has been a permanent annoyance for C/C++ programmers. Under MSVC, one useful feature of MFC is report memory leaks at the exit of an application (to the debugger output window, which can be displayed by the integration environment or a