vimrc配置文件_version1.0_+pathogen, taglist, wordcomplete插件说明
为了表示对Ruchee的感谢,首先这是Ruchee的个人网站:http://www.ruchee.com/index.html,他的以前很多的代码都放到Git里面了,里面有链接。
看了整整一天,刚开始学习vim的时候就是用的Ruchee的vimrc脚本,现在终于可以自己写一点了,又认真看了一下Ruchee原来的脚本,虽然还有一些不太懂,但还是赶脚好腻害的样子。
然后自己又加了一点自己东西:——适用于mac, linux平台
"Copyright 2013 Xueyang Liu, all rights reserved.
"www.cnblogs.com/liuxueyang/
"Hunan University " ********************SET********************
color lucius
"color desert
set nocompatible
set guifont=Monaco:h16
set lines= columns=
set nu numberwidth=
set cindent
set ai
set tabstop=
set shiftwidth=
set mouse=a
set autochdir
se hlsearch incsearch
se ruler
set laststatus=
set cmdheight=
syntax on
syntax enable
filetype plugin indent on
filetype indent on
filetype plugin on
"filetype on
"set bg=dark " ********************MAP********************
let mapleader=","
noremap <space> ve
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap wt :WMToggle<cr>
nnoremap <c-t> :NERDTree<cr>
nnoremap <c-a> :Tlist<cr>
"在某个单词上加上引号,括号
nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel
nnoremap <leader>' viw<esc>a'<esc>hbi'<esc>lel
nnoremap <leader>< viw<esc>a><esc>'<i<<esc>lw
"~~~~~~~~~~~~~~~大风歌~~~~~~~~~~~~~~~
vnoremap \ U
inoremap <c-d> <esc>ddi
inoremap <c-u> <esc>veU
inoremap jk <esc>
inoremap <esc> <nop>
"括号,引号自动补全
inoremap ( ()<esc>i
inoremap ) <c-r>=ClosePair(')')<cr>
inoremap { {}<esc>i
inoremap } <c-r>=ClosePair('}')<cr>
inoremap [ []<esc>i
inoremap ] <c-r>=ClosePair(']')<cr>
inoremap " ""<esc>i
inoremap ' ''<esc>i
onoremap p i(
onoremap b /return<cr> " ********************OTHER********************
iabbrev @@ www.cnblogs.com/liuxueyang/
iabbrev ccopy Copyright Xueyang Liu, all rights reserved.
autocmd BufWritePre *.html :normal gg=G
"下面这些autocmd还没有学会=_=
"autocmd FileType C++ nnoremap <buffer> <localleader>c I//<esc>
"autocmd FileType javascript nnoremap <buffer> <localleader>c I//<esc>
"autocmd FileType javascript :iabbrev <buffer> iff if()<left>
"autocmd FileType python nnoremap <buffer> <localleader>c I#<esc>
"autocmd FileType python : iabbrev <buffer> iff if:<left>
"echo ">^.^<" " ********************编译 && 运行********************
" Compile
func! CompileCode()
exec "w"
if &filetype == "c"
exec "!gcc -Wall -std=c99 %<.c -o %<"
elseif &filetype == "cpp"
exec "!g++ -Wall -std=c++98 %<.cpp -o %<"
elseif &filetype == "python"
exec "!python %<.py"
endif
endfunc
"Run
func! RunCode()
exec "w"
if &filetype == "c" || &filetype == "cpp"
exec "! ./%<"
elseif &filetype == "python"
exec "!python %<.py"
endif
endfunc
"<c-c> OneKey ComplieAndSave
nnoremap <c-c> :call CompileCode()<cr>
inoremap <c-c> <esc>:call CompileCode()<cr>
vnoremap <c-c> <esc>:call CompileCode()<cr>
"<c-r> OneKey RunAndSave
nnoremap <c-r> :call RunCode()<cr>
inoremap <c-r> <esc>:call RunCode()<cr>
vnoremap <c-r> <esc>:call RunCode()<cr>
"pathogen{
execute pathogen#infect()
call pathogen#infect()
"}
"taglist{
let Tlist_Show_One_File = "只显示当前文件的taglist,默认是显示多个
let Tlist_Exit_OnlyWindow = "如果taglist是最后一个窗口,则退出vim
let Tlist_Use_Right_Window = "在右侧窗口中显示taglist
let Tlist_GainFocus_On_ToggleOpen = "打开taglist时,光标保留在taglist窗口
let Tlist_Ctags_Cmd='/opt/local/bin/ctags' "设置ctags命令的位置
nnoremap <leader>tl : Tlist<CR> "设置关闭和打开taglist窗口的快捷键
"}
autocmd BufEnter * call DoWordComplete()
主要部分是抄的Ruchee的=_=
vimrc配置文件_version1.0_+pathogen, taglist, wordcomplete插件说明的更多相关文章
- vimrc配置文件
目录 vimrc配置文件 参考 主要功能 使用方法 配置文件 文件下载 vimrc配置文件
- 我现在的vimrc配置文件
runtime! debian.vim "设置编码 set encoding=utf- set fencs=utf-,ucs-bom,shift-jis,gb18030,gbk,gb2312 ...
- 使用pathogen管理Vim插件并托管到Github
参照文章[1][2]的办法,将vim打造成一个Python开发环境.文章中使用的是 pathogen + git 来管理 Vim 插件的.对这种方式还不太明白的同学可以参考[3]中的介绍.pathog ...
- vim之vimrc配置文件
""""""""""""""""&quo ...
- 公司测试服务器 vimrc 配置文件
" /etc/vimrc (configuration file for vim only) " author: Klaus Franken <kfr@suse.de> ...
- vim基本技巧
一.无插件vim使用 1.查看修改代码 1)光标移动 h j k l 前下上后 w b 词首.词尾 ^ $ 句首.句尾 2)编辑 x d r y p a i o . ...
- Vim 基本配置和经常使用的命令
vim 优势和应用场景 vim 的优点纯文字编辑和 Linux 完美的融合提供了命令行.只能假设 ssh 至server进行操作,那么这样的情况就仅仅能使用 vim 了.vim 也是最为强大的通用文本 ...
- 在ubuntu上搭建开发环境6---安装和使用vim及其插件(Pathogen和NERDTree)
2015.09.08 更为详细的配置vim的方法,请参见我的新整理的文章:http://segmentfault.com/a/1190000003722928 Vim安装 命令: sudo apt-g ...
- ctagst简单应用,将Vim改造:Ctags,Taglist,Cscope,OmniCppComplete,SuperTab,Winmanager,NERDTree,MiniBufExplorer,vimrc
vim + ctags $ ctags #给同一个目录下的所有文件建立tags 这时在tags文件所在的目录下打开源文件阅读,vim就会自动调用tags文件.如果tags文件不在当前目录下,能在命令模 ...
随机推荐
- ng-repeat的group
http://blog.csdn.net/violet_day/article/details/17023219 一.obj包含 <!doctype html> <html ng- ...
- Zooming MKMapView to fit annotation pins
http://stackoverflow.com/questions/4680649/zooming-mkmapview-to-fit-annotation-pins - (MKCoordinateR ...
- 使用rgba色实现背景色透明
父元素css属性:background-color: #000; background: rgba(0,0,0,.5); //现代浏览器属性,使用rgba色实现透明,对子属性不继承 filter: ...
- ScrollView中嵌入ListView,GridView冲突的解决(让ListView全显示出来)
ScrollView中嵌入原生ListView或GridView,会出现ListView,GridView显示不全的问题. 解决方法:重新构造一个ListView或GridView,重写OnMeasu ...
- xlistview的java(头)
package com.bwie.xlistviews; import com.bwie.test.R; import android.content.Context;import android.u ...
- SharePoint表单和工作流 - Nintex篇(一)
博客地址 http://blog.csdn.net/foxdave 本篇开始我将带大家去认识一个第三方的表单工作流工具--Nintex. 本篇将对该工具做一些简单的介绍. Nintex公司成立于200 ...
- Java选择结构、循环结构
1:switch语句(掌握) (1)格式: switch(表达式) { case 值1: 语句体1; break; case 值2: 语句体2; break; ... default: 语句体n+1; ...
- Mysql5.0以下 手工注入
order by 20 www. .com/product/introduction.php?id=-65 UNION SELECT user(),2 www. .com/product/introd ...
- Canopy使用教程 (2)
1.下载https://reputation.alienvault.com/reputation.data alienvault公司的IP信誉数据库文件到本地,手动或者wget 2.使用 read_c ...
- android avoiding-memory-leaks
android avoiding-memory-leaks Memory Leak是会有多个方面会引起的,比如Drawable, RemoteViews, Receiver, Cursor,Input ...