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配置的更多相关文章

  1. linux中keepalived实现nginx高可用配置

    linux中keepalived实现nginx高可用配置 安装keepalived 运行如下命令即可 tar -zxvf keepalived-2.0.8.tar.gz -C /usr/src cd ...

  2. Linux中安装C++编译器codeBlock,并配置opencv链接库

    1.Linux中安装codeBlock https://blog.csdn.net/xinyunyishui/article/details/50967395 2.CodeBlock中的中文显示不完全 ...

  3. linux中Python源码安装和配置

    安装 首先获取安装包,此处版本为3.7 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz 解压 tar xvf Python- ...

  4. Linux中Nginx服务器的部署和配置

    目录 Nginx安装方式: yum源安装 目录结构: 源码包安装 目录结构: Nginx中支持PHP Nginx中配置php对mysql数据库的支持 Nginx配置反向代理服务器 正常代理 根据不同端 ...

  5. Linux 中 Xampp 的 https 安全证书配置

    博客地址:http://www.moonxy.com 一.前言 HTTP 协议是不加密传输数据的,也就是用户跟你的网站之间传递数据有可能在途中被截获,破解传递的真实内容,所以使用不加密的 HTTP 的 ...

  6. Linux中 Lua 访问Sql Server的配置方法

    一.背景说明: 通过lua脚本实现对SQL Server数据库的操作. 二.具体设定: 安装流程图:如果是使用Lua连接SQL Server,从上到下则需要安装lua -> luaSQL-ODB ...

  7. linux中nmcli命令使用及网络配置

    nmcli命令与配置文件对应关系  主机名: 如果说你没有设置主机名的话,默认是localhost.localdomain 修改配置文件的主机名 # hostnamectl  set-hostname ...

  8. linux中搭建公网ftp服务器

    Linux搭建ftp服务器汇总整理 一.检查linux中是否已经安装vsftpd服务端软件 rpm -qa |grep vsftpd 二.卸载linux中的vsftpd服务端软件 rpm -e vsf ...

  9. Linux中Tomcat和Jboss的安装和部署

    目录 JDK环境 yum源安装JDK 源码包安装JDK Tomcat的安装 yum源安装 目录结构: 源码包安装 目录结构: 目录中主要的文件: JBoss的安装 目录结构: Tomcat是Apach ...

随机推荐

  1. mysql 权限管理 记录

    授权操作只能用root账号,其他账号都不行 创建一个mike账号 mysql'; Query OK, rows affected (0.08 sec) 查看是否创建账号 select * from m ...

  2. 【剑指offer】输入一个链表,输出该链表中倒数第k个结点。

    一.题目: 输入一个链表,输出该链表中倒数第k个结点. 二.思路: 用两个指针p1和p2,p2先跑k步,然后p1和p2同时跑,p2跑到头p1所在的位置就是倒数第k个节点.很简单吧?简单你也想不到,想到 ...

  3. spring boot集成shrio用于权限控制

    下面是一个简单的springBoot集成shrio的项目,技术是:spring boot+idea+gradle+shrio+mybatis 1:首先在build.gradle中导入依赖 builds ...

  4. tomcat上部署CGI

    CGI的定义是:外部应用程序与Web服务器之间的接口. 1.Tomcat7支持CGI,但是默认配置是关闭的需要进行如下配置 修改Tomcat conf/web.xml中两处代码,默认是注释掉的,去掉注 ...

  5. Python常用函数及说明

    原文地址:博客园  CSDN 基本定制型C.__init__(self[, arg1, ...]) 构造器(带一些可选的参数)C.__new__(self[, arg1, ...]) 构造器(带一些可 ...

  6. 常用软件安装及VS插件工具

    常用开发工具安装 开发环境 Visual Studio 2013 Microsoft SQL Server 2008 源代码管理 Git TortoiseGit GitScc Provider Cru ...

  7. recv函数返回值说明

    recv函数 int recv( SOCKET s, char FAR *buf, int len, int flags); 不论是客户还是服务器应用程序都用recv函数从TCP连接的另一端接收数据. ...

  8. js数组中indesOf方法的使用

    <html> <head> <title>数组的操作</title> <script type="text/javascript&quo ...

  9. 大神的博客地址liferay

    http://www.huqiwen.com/category/technology-share/liferay/

  10. Typecho博客让文章列表页只显示摘要的方法

    在当前主题的 index.php 文件中找到代码 <?php $this->content('阅读剩余部分...'); ?> 将其替换为 <?php $this->exc ...