我在linux中使用的vundle 和 vimrc配置
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Plugin 'gmarik/vundle'
Plugin 'taglist.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'snipMate'
Plugin 'minibufexplorerpp'
Plugin 'Shougo/neocomplcache'
Plugin 'mattn/emmet-vim'
Plugin 'mbbill/echofunc'
""Plugin 'checksyntax.vim'
Plugin 'Valloric/MatchTagAlways'
Plugin 'thisivan/vim-matchit'
" 引入前端开放需要的词库 包括: html.dic, css.dic, javascript.dic
Bundle 'asins/vim-dict'
call vundle#end()
filetype plugin indent on
let g:user_emmet_leader_key=""
" 设置字典 文件的 路径, 这个路径就是你放 js.dict文件的目录
autocmd FileType javascript set dictionary=~/.vim/dict/javascript.dict
let Tlist_Use_Right_Window=1
/etc/vimrc的配置:
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,gb2312,gbk,latin1
endif
set ts=4
set expandtab
set autoindent
set nocompatible " Use Vim defaults (much better!)
nmap :NERDTreeToggle
inoremap jk
set bs=indent,eol,start " allow backspacing over everything in insert mode
set mouse=a
"insert mode下也可以 快速移动到行尾和行首"
inoremap nn I
inoremap A
inoremap I
inoremap jj ji
inoremap kk ki
inoremap hh ha
inoremap ll la
set nu
"generate pair of brackets and quotes automatically
inoremap " ""i
inoremap ' ''i
" inoremap ( ()i
inoremap [ []i
inoremap { {}i
nmap "+y
nmap "+gp
let g:neocomplcache_enable_at_startup = 1
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup fedora
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead .txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost
if line("'"") > 0 && line ("'"") <= line("$") |
exe "normal! g'"" |
endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/,/run/media/,/mnt/* set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add $PWD/cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
filetype plugin on
if &term=="xterm"
set t_Co=8
set t_Sb=[4%dm
set t_Sf=[3%dm
endif
" Don't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"
map :silent! Tlist
" let Tlist_Ctags_Cmd='ctags' "因为我们放在环境变量里,所以可以直接执行
let Tlist_Use_Right_Window=1 "让窗口显示在右边,0的话就是显示在左边
let Tlist_Show_One_File=0 "让taglist可以同时展示多个文件的函数列表,如果想只有1个,设置为1
let Tlist_File_Fold_Auto_Close=1 "非当前文件,函数列表折叠隐藏
let Tlist_Exit_OnlyWindow=1 "当taglist是最后一个分割窗口时,自动推出vim
let Tlist_Process_File_Always=1 "是否一直处理tags.1:处理;0:不处理
let Tlist_WinHeight=100 "设置窗口高度
let Tlist_WinWidth=24 "设置窗口宽度
let Tlist_Inc_Winwidth=0
" 缺省情况下,在双击一个tag时,才会跳到该tag定义的位置,如果你想单击tag就跳转,设置Tlist_Use_SingleClick为1
let Tlist_Use_SingleClick=1
" 如果你想在启动VIM后,自动打开taglist窗口,设置
""let Tlist_Auto_Open=1
" 如果你希望在选择了tag后自动关闭taglist窗口,设置
let Tlist_Close_On_Select=1
" 当同时显示多个文件中的tag时,设置Tlist_File_Fold_Auto_Close为1,可使taglist只显示当前文件tag,其它文件的tag都被折叠起来
" let Tlist_File_Fold_Auto_Close=1
" 在使用:TlistToggle打开taglist窗口时,如果希望输入焦点在taglist窗口中,设置
let Tlist_GainFocus_On_ToggleOpen=1
"Tlist_Use_Horiz_Window为1设置taglist窗口横向显示;
"插入括号时, 短暂地跳转到匹配的对应括号"
set showmatch
set matchtime=2
set magic
set hidden "允许在有未保存的修改时, 切换缓冲区, 此时的修改由vim负责保存
set cmdheight=2 "设置命令行的高度为2行"
nnoremap @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo') " 用空格键来开关折叠
"-----------------------------------------------------------------
" plugin – checksyntax.vim JavaScript常见语法错误检查
" 默认快捷方式为 F5
"-----------------------------------------------------------------
let g:checksyntax_auto = 0 " 不自动检查
我在linux中使用的vundle 和 vimrc配置的更多相关文章
- linux中keepalived实现nginx高可用配置
linux中keepalived实现nginx高可用配置 安装keepalived 运行如下命令即可 tar -zxvf keepalived-2.0.8.tar.gz -C /usr/src cd ...
- Linux中安装C++编译器codeBlock,并配置opencv链接库
1.Linux中安装codeBlock https://blog.csdn.net/xinyunyishui/article/details/50967395 2.CodeBlock中的中文显示不完全 ...
- linux中Python源码安装和配置
安装 首先获取安装包,此处版本为3.7 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz 解压 tar xvf Python- ...
- Linux中Nginx服务器的部署和配置
目录 Nginx安装方式: yum源安装 目录结构: 源码包安装 目录结构: Nginx中支持PHP Nginx中配置php对mysql数据库的支持 Nginx配置反向代理服务器 正常代理 根据不同端 ...
- Linux 中 Xampp 的 https 安全证书配置
博客地址:http://www.moonxy.com 一.前言 HTTP 协议是不加密传输数据的,也就是用户跟你的网站之间传递数据有可能在途中被截获,破解传递的真实内容,所以使用不加密的 HTTP 的 ...
- Linux中 Lua 访问Sql Server的配置方法
一.背景说明: 通过lua脚本实现对SQL Server数据库的操作. 二.具体设定: 安装流程图:如果是使用Lua连接SQL Server,从上到下则需要安装lua -> luaSQL-ODB ...
- linux中nmcli命令使用及网络配置
nmcli命令与配置文件对应关系 主机名: 如果说你没有设置主机名的话,默认是localhost.localdomain 修改配置文件的主机名 # hostnamectl set-hostname ...
- linux中搭建公网ftp服务器
Linux搭建ftp服务器汇总整理 一.检查linux中是否已经安装vsftpd服务端软件 rpm -qa |grep vsftpd 二.卸载linux中的vsftpd服务端软件 rpm -e vsf ...
- Linux中Tomcat和Jboss的安装和部署
目录 JDK环境 yum源安装JDK 源码包安装JDK Tomcat的安装 yum源安装 目录结构: 源码包安装 目录结构: 目录中主要的文件: JBoss的安装 目录结构: Tomcat是Apach ...
随机推荐
- Python性能鸡汤(转)
英文原文:http://blog.monitis.com/index.php/2012/02/13/python-performance-tips-part-1/ 英文原文:http://blog.m ...
- 启动InnoDB引擎的方法
启动InnoDB引擎的方法 http://down.chinaz.com/server/201207/2090_1.htm 启动InnoDB引擎的方法 Mysql中默认的是MyISAM数据引擎,可惜此 ...
- 3.cassandra遇到内存占用过高的问题
目前cssandra的内存分配如下: https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_tune_jvm_c.ht ...
- PAT Spell It Right [非常简单]
1005 Spell It Right (20)(20 分) Given a non-negative integer N, your task is to compute the sum of al ...
- 阿里云小规模web集群分享(电商)
计算基础资源使用阿里云ECS.OSS.RDS.mysql中间件.CDN 原则是尽量少改动代码来实现web集群 1.负载均衡器: a)负责处理所有请求 b)http动态请求分配到后端web服务器 c)维 ...
- oracle修改内存使用和性能调节,SGA
最近装了oracle,电脑实在太卡了,想要限制内存使用,结果碰到一系列问题: 要用SYS帐户登录,修改SGA使用,结果不知道SYS密码.用SYSTEM帐户权限不够. 试了几条语句后,有几个文件修改不了 ...
- background 背景图片 在IE8中不显示解决方法
我给ul加了一个背景图片 background 火狐 ie9 ch都显示.唯独在IE8中不显示 之前的样式代码 background: url( rgba(, , , ); 在ie8中改成 backg ...
- recv函数返回值说明
recv函数 int recv( SOCKET s, char FAR *buf, int len, int flags); 不论是客户还是服务器应用程序都用recv函数从TCP连接的另一端接收数据. ...
- java数据结构经典问题
A:栈抽象数据类型 1.栈的主要操作 void push(int data);将data数据插入栈中. int pop();删除并返回最后一个插入栈的元素. 2.栈的辅助操作 int top();返回 ...
- yii2之创建管理员
第一步,使用迁移文件建表admin 先建立数据迁移文件: 小贴士,如果发现自己改错了,需要重新修改迁移文件 第二步,使用gii工具创建model 创建一个新的model,继承AdminAR,方便以后管 ...