常用vimrc记录
记录下vim 的一些常用配置。每当换到一台新电脑的时候,使用vim的时候,缩进等各种方式都不友好。每次都要到互联网上去找,还要找半天,这篇博客,记录下我常用的vim配置,以及扩展,能够快速的配置开发环境。提高工作效率,省下的时间用来玩耍或者陪家人朋友。
set nu
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
set number "显示行号
set nowrap "不换行
set shiftwidth=4 "默认缩进4个空格
set softtabstop=4 "使用tab时 tab空格数
set tabstop=4 "tab代表4个空格
set laststatus=2 "总是显示状态行
"backspace键
" indent 删除自动缩进的值
" eol 删除上一行行末尾的回车,两行合并
" start 除了刚输入的,还删除原来的字符
set backspace=indent,eol,start
set expandtab "使用空格替换tab
set autoindent " 自动缩进
colorscheme evening "颜色模式
syn on "语法高亮
filetype on "文件类型
set encoding=utf-8 "编码为utf8
安装vim 的扩展管理插件
Vundle是一款Vim的插件管理软件(Linux),用起来很方便的原因有几点:
- 支持插件超多,可以来源于github、Vundle自带、Vim-scripts、本地仓库等等。
- 安装流程非常简单,配置好vimrc后一键安装/更新所有
- Vundle很容易上手,很方便
下载vundle到指定位置
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
添加如下配置文件
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
常用vimrc记录的更多相关文章
- WPF DataGrid常用属性记录
WPF DataGrid常用属性记录 组件常用方法: BeginEdit:使DataGrid进入编辑状态. CancelEdit:取消DataGrid的编辑状态. CollapseRowGroup:闭 ...
- android布局常用属性记录
android布局常用属性记录 http://blog.csdn.net/xn4545945/article/details/7717086这里有一部分别人总结的其余的: align:对齐 par ...
- Hbase常用操作记录
Hbase常用操作记录 Hbase 创建表 查看表结构 修改表结构 删除表 创建表 语法:create <table>, {NAME => <family>, VERSI ...
- 转 My97日历控件常用功能记录
My97相信大家都不陌生,应该是我所见过的最强大的一个日历控件了,最近的项目中也比较多地用到了此控件,而且项目中经常会有不同时间范围的需求,在此列出一些比较常用的日期范围格式的设置,尽管在My97的官 ...
- 前端常用功能记录(二)—datatables表格(转)
前端常用功能记录(二)—datatables表格 并不是所有的后台开发都有美工和前端工程师来配合做页面,为了显示数据并有一定的美感,jQuery的DataTables插件对于像我这样的前端菜鸟来说真是 ...
- MVC中验证码的实现(经常用,记录备用)
一.目录 1.多层架构+MVC+EF+AUTOFAC+AUTOMAPPER: 2.MVC中验证码的实现(经常用,记录备用) 3.Ligerui首页的快速搭建 二 正文 Ok,我们的验证码开始,这篇文章 ...
- Centos下磁盘管理的常用命令记录(如查找大文件)
Centos下磁盘管理的常用命令记录 查看系统磁盘空间占用,使用命令: df -h 结果: 查看磁盘inode使用情况,如果inode用完了,磁盘就没法写入新的内容了: df -i 结果: 如何查找磁 ...
- etcd常用命令记录
etcd常用命令记录 1.查看etcd的版本 [root@etcd01 ssl]# curl -L http://127.0.0.1:2379/version {"etcdserver& ...
- 《ORACLE数据库管理与开发》第三章学习之常用函数记录
<ORACLE数据库管理与开发>第三章学习之常用函数记录 注:文章中的*代表所要操作的列名 1.lower(*)/upper(*),将此列下的值转为小写/大写 2.initcap(*):把 ...
随机推荐
- Spring配置文件引入xml文件: <import resource=" " />标签使用总结
引入其他模块XML 在Spring的配置文件,有时候为了分模块的更加清晰的进行相关实体类的配置. 比如现在有一个job-timer.xml的配置 <?xml version="1.0& ...
- Vue怎么使用Echarts创建图表
摘要:在后台管理系统中,我们经常会遇到图表,比如说:柱形图,饼状图,折线图,雷达图等等,而用来写图表插件有很多,我这里主要介绍Echarts在项目里怎么使用,官网地址如下:https://echart ...
- [转]magento性能优化的教程(非常详细)
本文转自:https://www.sypopo.com/post/kMQE8dERoV/ 前面优化 mod_deflate模块,将text. css 和 javascript 先进行压缩再发送到浏览器 ...
- gulp自动添加版本号过程中的一些要点记录
1.打开node_modules\gulp-rev\index.js 第144行 manifest[originalFile] = revisionedFile; 更新为: manifest[orig ...
- Android - Navigation Drawer
http://www.jianshu.com/p/c8cbeb7ea43a 用Navigation Drawer 和 Navigation View 来实现左右侧滑 Activity里甚至什么都不用写 ...
- 脚本执行错误---/bin/sh^M:损坏的解释器 没有那个文件或目录
在执行脚本时,弹出错误提示: 这是由于脚本文件在保存时使用了DOS文件格式造成的,可以用vim打开文件,然后执行下列操作:
- 用Dreamweaver离线编写WordPress文章
WordPress 自带的编辑器功能较弱,也不支持离线写文章.Windows Live Writer功能还行,不过早就停止更新了.如何能够找到一个功能强大的,可以离线编辑文章的WordPress文章编 ...
- 你不知道的JavasScript上篇·第五章·原型·下
5.差异继承 继承意味着复制操作: 差异继承: 基本原则是在描述对象行为时,使用其不同于普遍描述的特制. (我的理解是只用对象自身的而不用普遍继承的像是toString(),valueOf()这种方法 ...
- 【代码笔记】iOS-播放从网络上下载的语音
代码: ViewController.m #import "ViewController.h" //录音 #import <AVFoundation/AVFoundation ...
- 【读书笔记】iOS-网络-HTTP-URL百分号编码
代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, ty ...