" /etc/vimrc (configuration file for vim only)
" author: Klaus Franken <kfr@suse.de>
" author: Werner Fink <werner@suse.de>
" author: Florian La Roche <florian@suse.de>
" version: 00/01/20
" commented lines start with `"' " enable syntax highlighting
syntax on " automatically indent lines (default)
" set noautoindent " select case-insenitiv search (not default)
set ignorecase " show cursor line and column in the status line
set ruler " show matching brackets
set showmatch " display mode INSERT/REPLACE/...
set showmode " changes special characters in search patterns (default)
" set magic " Required to be able to use keypad keys and map missed escape sequences
set esckeys " get easier to use and more user friendly vim defaults
" CAUTION: This option breaks some vi compatibility.
" Switch it off if you prefer real vi compatibility
set nocompatible " Complete longest common string, then each full match
" enable this for bash compatible behaviour
" set wildmode=longest,full " Try to get the correct main terminal type
if &term =~ "xterm"
let myterm = "xterm"
else
let myterm = &term
endif
let myterm = substitute(myterm, "cons[0-9][0-9].*$", "linux", "")
let myterm = substitute(myterm, "vt1[0-9][0-9].*$", "vt100", "")
let myterm = substitute(myterm, "vt2[0-9][0-9].*$", "vt220", "")
let myterm = substitute(myterm, "\\([^-]*\\)[_-].*$", "\\1", "") " Here we define the keys of the NumLock in keyboard transmit mode of xterm
" which misses or hasn't activated Alt/NumLock Modifiers. Often not defined
" within termcap/terminfo and we should map the character printed on the keys.
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
" keys in insert/command mode.
map! <ESC>Oo :
map! <ESC>Oj *
map! <ESC>Om -
map! <ESC>Ok +
map! <ESC>Ol ,
map! <ESC>OM
map! <ESC>Ow
map! <ESC>Ox
map! <ESC>Oy
map! <ESC>Ot
map! <ESC>Ou
map! <ESC>Ov
map! <ESC>Oq
map! <ESC>Or
map! <ESC>Os
map! <ESC>Op
map! <ESC>On .
" keys in normal mode
map <ESC>Oo :
map <ESC>Oj *
map <ESC>Om -
map <ESC>Ok +
map <ESC>Ol ,
map <ESC>OM
map <ESC>Ow
map <ESC>Ox
map <ESC>Oy
map <ESC>Ot
map <ESC>Ou
map <ESC>Ov
map <ESC>Oq
map <ESC>Or
map <ESC>Os
map <ESC>Op
map <ESC>On .
endif " xterm but without activated keyboard transmit mode
" and therefore not defined in termcap/terminfo.
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
" keys in insert/command mode.
map! <Esc>[H <Home>
map! <Esc>[F <End>
" Home/End: older xterms do not fit termcap/terminfo.
map! <Esc>[~ <Home>
map! <Esc>[~ <End>
" Up/Down/Right/Left
map! <Esc>[A <Up>
map! <Esc>[B <Down>
map! <Esc>[C <Right>
map! <Esc>[D <Left>
" KP_5 (NumLock off)
map! <Esc>[E <Insert>
" PageUp/PageDown
map <ESC>[~ <PageUp>
map <ESC>[~ <PageDown>
map <ESC>[;~ <PageUp>
map <ESC>[;~ <PageDown>
map <ESC>[;~ <PageUp>
map <ESC>[;~ <PageDown>
" keys in normal mode
map <ESC>[H
map <ESC>[F $
" Home/End: older xterms do not fit termcap/terminfo.
map <ESC>[~
map <ESC>[~ $
" Up/Down/Right/Left
map <ESC>[A k
map <ESC>[B j
map <ESC>[C l
map <ESC>[D h
" KP_5 (NumLock off)
map <ESC>[E i
" PageUp/PageDown
map <ESC>[~
map <ESC>[~
map <ESC>[;~
map <ESC>[;~
map <ESC>[;~
map <ESC>[;~
endif " xterm/kvt but with activated keyboard transmit mode.
" Sometimes not or wrong defined within termcap/terminfo.
if myterm == "xterm" || myterm == "kvt" || myterm == "gnome"
" keys in insert/command mode.
map! <Esc>OH <Home>
map! <Esc>OF <End>
map! <ESC>O2H <Home>
map! <ESC>O2F <End>
map! <ESC>O5H <Home>
map! <ESC>O5F <End>
" Cursor keys which works mostly
" map! <Esc>OA <Up>
" map! <Esc>OB <Down>
" map! <Esc>OC <Right>
" map! <Esc>OD <Left>
map! <Esc>[;~ <Insert>
map! <Esc>[;~ <Delete>
map! <Esc>[;~ <Insert>
map! <Esc>[;~ <Delete>
map! <Esc>O2A <PageUp>
map! <Esc>O2B <PageDown>
map! <Esc>O2C <S-Right>
map! <Esc>O2D <S-Left>
map! <Esc>O5A <PageUp>
map! <Esc>O5B <PageDown>
map! <Esc>O5C <S-Right>
map! <Esc>O5D <S-Left>
" KP_5 (NumLock off)
map! <Esc>OE <Insert>
" keys in normal mode
map <ESC>OH
map <ESC>OF $
map <ESC>O2H
map <ESC>O2F $
map <ESC>O5H
map <ESC>O5F $
" Cursor keys which works mostly
" map <ESC>OA k
" map <ESC>OB j
" map <ESC>OD h
" map <ESC>OC l
map <Esc>[;~ i
map <Esc>[;~ x
map <Esc>[;~ i
map <Esc>[;~ x
map <ESC>O2A ^B
map <ESC>O2B ^F
map <ESC>O2D b
map <ESC>O2C w
map <ESC>O5A ^B
map <ESC>O5B ^F
map <ESC>O5D b
map <ESC>O5C w
" KP_5 (NumLock off)
map <ESC>OE i
endif if myterm == "linux"
" keys in insert/command mode.
map! <Esc>[G <Insert>
" KP_5 (NumLock off)
" keys in normal mode
" KP_5 (NumLock off)
map <ESC>[G i
endif " This escape sequence is the well known ANSI sequence for
" Remove Character Under The Cursor (RCUTC[tm])
map! <Esc>[~ <Delete>
map <ESC>[~ x " Only do this part when compiled with support for autocommands.
if has("autocmd")
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif endif " has("autocmd") " Changed default required by SuSE security team--be aware if enabling this
" that it potentially can open for malicious users to do harmful things.
set modelines= set number " get easier to use and more user friendly vim defaults
" /etc/vimrc ends here

公司测试服务器 vimrc 配置文件的更多相关文章

  1. vimrc配置文件

    目录 vimrc配置文件 参考 主要功能 使用方法 配置文件 文件下载 vimrc配置文件

  2. vimrc配置文件_version1.0_+pathogen, taglist, wordcomplete插件说明

    为了表示对Ruchee的感谢,首先这是Ruchee的个人网站:http://www.ruchee.com/index.html,他的以前很多的代码都放到Git里面了,里面有链接. 看了整整一天,刚开始 ...

  3. 我现在的vimrc配置文件

    runtime! debian.vim "设置编码 set encoding=utf- set fencs=utf-,ucs-bom,shift-jis,gb18030,gbk,gb2312 ...

  4. vim之vimrc配置文件

    """"""""""""""""&quo ...

  5. vim 的配置文件(.vimrc)

    linux 下面的root的主目录中新建.vimrc配置文件,配置文件注析方式为“,不是#: 如: "显示行号 set number set ruler

  6. Vim配置文件-详解(.vimrc)

    Vim配置文件的作用 Vim启动时,会根据配置文件(.vimrc)来设置 Vim,因此我们可以通过此文件来定制适合自己的 Vim Vim分类 系统Vim配置文件/etc/vimrc 所有系统用户在启动 ...

  7. vim配置文件和插件管理

    本文通过总结零碎的资料总结而成,更多是去引导学习vim配置文件及插件使用. .vimrc配置文件,内容如下(备注清晰) "引入插件pathogen使用 execute pathogen#in ...

  8. Linux下编辑利器vim,vimrc,viminfo的高级用法

    1.ci" (由 change operator 和 text-object i" 组成) 这个命令会找到当前光标所在行的下一个 " 括起来的字符串,清除引号裏面的内容, ...

  9. Linux VIM8.1 Python3 编辑器配置文件

    Linux VIM8.1 Python3 编辑器配置文件 实现功能: 自动补全(包括函数模块方法补全) 自动代码标准格式化 自动检查代码错误 自定义头文件 自动括号补全 缩进指示线 代码一键折叠 代码 ...

随机推荐

  1. 【BZOJ】2724: [Violet 6]蒲公英

    2724: [Violet 6]蒲公英 Time Limit: 40 Sec  Memory Limit: 512 MBSubmit: 2900  Solved: 1031[Submit][Statu ...

  2. [转]Android:异步处理之AsyncTask的应用(二)

    2014-11-07     既然UI老人家都这么忙了,我们这些开发者肯定不能不识趣的去添乱阻塞UI线程什么的,否则UI界面万一停止响应了呢——这不是招骂的节奏么?!所以我们知道用Handler+Th ...

  3. [转]android.support.v4.app.Fragment和android.app.Fragment区别

      1.最低支持版本不同 android.app.Fragment 兼容的最低版本是android:minSdkVersion="11" 即3.0版 android.support ...

  4. HDU 5646 DZY Loves Partition 数学 二分

    DZY Loves Partition 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5646 Description DZY loves parti ...

  5. Codeforces Round #301 (Div. 2) D. Bad Luck Island 概率DP

    D. Bad Luck Island Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/540/pr ...

  6. PAT甲级1034. Head of a Gang

    PAT甲级1034. Head of a Gang 题意: 警方找到一个帮派的头的一种方式是检查人民的电话.如果A和B之间有电话,我们说A和B是相关的.关系的权重被定义为两人之间所有电话的总时间长度. ...

  7. android开发:退出程序(对话框、两次返回键退出)

    private void exitDialog() { AlertDialog.Builder aa=new AlertDialog.Builder(this); aa.setTitle(" ...

  8. windows端口

    端口可分为3大类: 1) 公认端口(Well Known Ports):从0到1023,它们紧密绑定于一些服务.通常这些端口的通讯明确表明了某种服务的协议.例如:80端口实际上总是HTTP通讯. 2) ...

  9. Mantis使用说明

    Mantis是一个缺陷跟踪系统,以Web操作的形式提供项目管理及缺陷跟踪服务. Mantis可以帮助所有开发人员完成系统需求缺陷的有效管理,对于bug问题的状态变化将通过mail的形式由系统自动通知相 ...

  10. sql 的 DATE_FORMATE()函数

    定义和用法 DATE_FORMAT() 函数用于以不同的格式显示日期/时间数据. 语法 DATE_FORMAT(date,format) date 参数是合法的日期.format 规定日期/时间的输出 ...