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. 几种常用CSS3样式

    在我们日常工作中,由于考虑到浏览器的兼容性,所以很少用CSS3样式.关于其标准,W3C 仍然在对 CSS3 规范进行开发.不过,现代浏览器已经实现了相当多的 CSS3 属性.最近学习了CSS3,发现功 ...

  2. 第五课 JAVA反射获取对象属性和方法(通过配置文件)

    Service1.java package reflection; public class Service1 { public void doService1(){ System.out.print ...

  3. sql server 2005 使用Log Explorer查看和恢复数据

    使用Log Explorer查看和恢复数据    Log Explorer 4.1.可用于SQL Server2005的日志查看工具   下载地址: http://download.csdn.net/ ...

  4. hadoop备战:yarn框架的简单介绍(mapreduce2)

    新 Hadoop Yarn 框架原理及运作机制 重构根本的思想是将 JobTracker 两个基本的功能分离成单独的组件,这两个功能是资源管理和任务调度 / 监控.新的资源管理器全局管理全部应用程序计 ...

  5. Linuxer-&quot;Linux开发人员自己的媒体&quot;第五月稿件和赠书名单

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/juS3Ve/article/details/78859630 Linuxer已经从一个单纯的读者服务 ...

  6. appstore加速审核通道

    申请入口:https://developer.apple.com/contact/app-store/?topic=expedite

  7. Summary: 书架问题

    Consider the problem of storing n books on shelves in a library. The order of the books is fixed by ...

  8. Servlet—作controller控制层

    servlet控制器的改造步骤: 1.编写servlet类,和访问路径 2.修改jsp请求路径 servlet参数配置---获取初始化参数 servlet参数配置---全局参数

  9. AdaBoost学习笔记

    学习了李航<统计学习方法>第八章的提升方法,现在对常用的一种提升方法AdaBoost作一个小小的笔记,并用python实现书本上的例子,加深印象.提升方法(boosting)是一种常用的统 ...

  10. Hive 体系结构介绍

    下面是Hive的架构图. 图1.1 Hive体系结构 Hive的体系结构可以分为以下几部分: (1)用户接口主要有三个:CLI,Client 和 WUI.其中最常用的是CLI,Cli启动的时候,会同时 ...