记录下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

参考资料

https://www.cnblogs.com/xcw0754/p/8391711.html

常用vimrc记录的更多相关文章

  1. WPF DataGrid常用属性记录

    WPF DataGrid常用属性记录 组件常用方法: BeginEdit:使DataGrid进入编辑状态. CancelEdit:取消DataGrid的编辑状态. CollapseRowGroup:闭 ...

  2. android布局常用属性记录

    android布局常用属性记录   http://blog.csdn.net/xn4545945/article/details/7717086这里有一部分别人总结的其余的: align:对齐 par ...

  3. Hbase常用操作记录

    Hbase常用操作记录 Hbase 创建表 查看表结构 修改表结构 删除表 创建表 语法:create <table>, {NAME => <family>, VERSI ...

  4. 转 My97日历控件常用功能记录

    My97相信大家都不陌生,应该是我所见过的最强大的一个日历控件了,最近的项目中也比较多地用到了此控件,而且项目中经常会有不同时间范围的需求,在此列出一些比较常用的日期范围格式的设置,尽管在My97的官 ...

  5. 前端常用功能记录(二)—datatables表格(转)

    前端常用功能记录(二)—datatables表格 并不是所有的后台开发都有美工和前端工程师来配合做页面,为了显示数据并有一定的美感,jQuery的DataTables插件对于像我这样的前端菜鸟来说真是 ...

  6. MVC中验证码的实现(经常用,记录备用)

    一.目录 1.多层架构+MVC+EF+AUTOFAC+AUTOMAPPER: 2.MVC中验证码的实现(经常用,记录备用) 3.Ligerui首页的快速搭建 二 正文 Ok,我们的验证码开始,这篇文章 ...

  7. Centos下磁盘管理的常用命令记录(如查找大文件)

    Centos下磁盘管理的常用命令记录 查看系统磁盘空间占用,使用命令: df -h 结果: 查看磁盘inode使用情况,如果inode用完了,磁盘就没法写入新的内容了: df -i 结果: 如何查找磁 ...

  8. etcd常用命令记录

    etcd常用命令记录   1.查看etcd的版本 [root@etcd01 ssl]# curl -L http://127.0.0.1:2379/version {"etcdserver& ...

  9. 《ORACLE数据库管理与开发》第三章学习之常用函数记录

    <ORACLE数据库管理与开发>第三章学习之常用函数记录 注:文章中的*代表所要操作的列名 1.lower(*)/upper(*),将此列下的值转为小写/大写 2.initcap(*):把 ...

随机推荐

  1. nginx-access.log的logstash解析

    1.nginx的access的格式: log_format hehe '$http_host $server_addr $remote_addr [$time_local] "$reques ...

  2. Docker基础教程(命令详解)

    # docker --help Usage: docker [OPTIONS] COMMAND [arg...] docker daemon [ --help | ... ] docker [ -h ...

  3. Deep learning with Python 学习笔记(5)

    本节讲深度学习用于文本和序列 用于处理序列的两种基本的深度学习算法分别是循环神经网络(recurrent neural network)和一维卷积神经网络(1D convnet) 与其他所有神经网络一 ...

  4. ADNI数据和样例

    ADNI临床数据集: 由各个学科的临床信息组成,包括招募.人口统计特征.体格检查和认知评估数据 所收集的临床数据: 基因数据: ILLUMINA SNP基因分型检测 ADNI的一个关键目标就是为研究人 ...

  5. 下载imagenet2012数据集,以及label说明

    updated@2018-12-07 15:22:08 官方下载地址:http://www.image-net.org/challenges/LSVRC/2012/nonpub-downloads , ...

  6. JS存储cookie读取cookie删除cookie详细用法

    假设有这样一种情况,在某个用例流程中,由A页面跳至B页面,若在A页面中采用JS用变量temp保存了某一变量的值,在B页面的时候,同样需要使用JS来引用temp的变量值,对于JS中的全局变量或者静态变量 ...

  7. 为什么IIS的应用池回收设置默认为1740分钟-20180720

    [非原创,个人收集,希望大家有感触] 你可曾留心过IIS的应用池回收设置默认值是多少?1740分钟对吗,那么为什么会是这样的数值呢? 在asp.net的某篇博客里提到了这个问题. 有关微软产品的许多决 ...

  8. [日常] Go语言圣经-Goroutines和线程

    Goroutines和线程: 1.动态栈: 1)线程都有一个固定大小的内存块(一般会是2MB)来做栈 2)一个goroutine会以一个很小的栈开始其生命周期,一般只需要2KB,不是固定的:栈的大小会 ...

  9. [android] WebView自定义浏览器

    在布局文件中添加<EditText/>和<Button/>控件, 在布局文件中添加<WebView/>控件 在Activity中获取WebView对象 调用WebV ...

  10. Java - 线程优先级和守护线程

    Java多线程系列--“基础篇”10之 线程优先级和守护线程 概要 本章,会对守护线程和线程优先级进行介绍.涉及到的内容包括:1. 线程优先级的介绍2. 线程优先级的示例3. 守护线程的示例 转载请注 ...