自定义 vim
windows cmder 安装 Vundle
- git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- vi /etc/vimrc 上,添加Configure Plugins
- :PluginInstall
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'mattn/emmet-vim' "插件名安装
Plugin 'file:///home/gmarik/path/to/plugin' “ 本地安装
Plugin 'git://git.wincent.com/command-t.git' " 插件github地址安装
" 上面添加插件
call vundle#end() " required
filetype plugin indent on " required
安装 YouCompleteMe Plugin 'Valloric/YouCompleteMe'
vim配置
通过下面的命令可以找到它的位置:
:scriptnames
例如,象这样去编辑该文件:
:edit ~/.vimrc
接下来你就可以在里面添加你自己的命令设置了,就象你在 Vim 里进行设置时所用的命令一样 。 如:
Go:set hlsearch<Esc>
"G"命令先移动到文件末尾 。 "o"另辟一行进行编辑,在该行上键入你的":set"命令 。 然后用<Esc>来退出插入模式 。 最后保存文件:
ZZ
:set autowrite
:set filetype=javascript 手工指定该文件的类型
/usr/share/vim/vim80/syntax 目录下代表支持高亮的文件类型
\cmder\vendor\git-for-windows\usr\share\vim\vim80\syntax 他在这里可以找到
set iskeyword& 在最后添加&让这个配置恢复其默认值,关键命令
:set nu! 显示行号
:set nonu 不显示行号
:set ignorecase 忽略大小写
:set noignorecase 不忽略大小写
:set hlsearch 高亮变量
:set nohlsearch 取消高亮
let g:user_emmet_leader_key='<C-Z>' "改Emmet的快捷键
set showmatch "代码匹配
set autoread "文件在Vim之外修改过,自动重新读入
set ignorecase "检索时忽略大小写
set fileencodings=uft-8,gbk "使用utf-8或gbk打开文件
set helplang=cn "帮助系统设置为中文
set autowrite 自动保存,并不是隔段时间自动保存
set noautowrite 不自动保存
set whichwrap=b,s,\<,\>,[,],l,h 光标移动到一行的头或尾的时候继续移动
set so=0 光标快到上下边界,引发窗口滚动
:help 'wrap' 查看一个命令怎么使用
set nowrap 不折行
:set list 显示制表符
:set cmdheight=3 窗口最底部显示信息行数
:syntax enable 开启彩色
set filetype 当前文件类型
:set background=dark 设置背景色
:set background=light
:w index.html 把当前文件内容写到另一个文件
:w >> index.html 追加
:set backup 生成备份文件 ~
:set backupext=.bak 设置备份文件后缀
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'
" Plugin 'Valloric/YouCompleteMe'
Plugin 'mattn/emmet-vim'
Plugin 'dart-lang/dart-vim-plugin'
Plugin 'mxw/vim-jsx'
Plugin 'posva/vim-vue'
Plugin 'pangloss/vim-javascript'
Plugin 'git@github.com:leafgarland/typescript-vim.git'
Plugin 'mhartington/vim-angular2-snippets'
Plugin 'git@github.com:hail2u/vim-css3-syntax.git'
Plugin 'git@github.com:ap/vim-css-color.git'
Plugin 'git@github.com:wavded/vim-stylus.git'
Plugin 'groenewege/vim-less'
Plugin 'cakebaker/scss-syntax.vim'
Plugin 'git@github.com:scrooloose/nerdtree.git' " 文件系统资源管理器
" Plugin 'git@github.com:Shougo/deoplete.nvim.git'
" Plugin 'git@github.com:kien/ctrlp.vim.git'
Plugin 'git@github.com:vim-scripts/AutoComplPop.git'
" Plugin 'Valloric/YouCompleteMe'
" 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)
" Plugin 'file:///home/gmarik/path/to/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
" Setting some decent VIM settings for programming
set ai " set auto-indenting on for programming
set showmatch " automatically show matching brackets. works like it does in bbedit.
set vb " turn on the "visual bell" - which is much quieter than the "audio blink"
set ruler " show the cursor position all the time
set laststatus=2 " make the last line where the status is two lines deep so you can see status always
set backspace=indent,eol,start " make that backspace key work the way it should
set nocompatible " vi compatible is LAME
set background=dark " Use colours that work well on a dark background (Console is usually black)
set showmode " show the current mode
set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows
syntax on " turn syntax highlighting on by default
" Show EOL type and last modified timestamp, right after the filename
set statusline=%<%F%h%m%r\ [%{&ff}]\ (%{strftime(\"%H:%M\ %d/%m/%Y\",getftime(expand(\"%:p\")))})%=%l,%c%V\ %P
"------------------------------------------------------------------------------
" Only do this part when compiled with support for autocommands.
if has("autocmd")
"Set UTF-8 as the default encoding for commit messages
autocmd BufReadPre COMMIT_EDITMSG,MERGE_MSG,git-rebase-todo setlocal fileencodings=utf-8
"Remember the positions in files with some git-specific exceptions"
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$")
\ && expand("%") !~ "COMMIT_EDITMSG"
\ && expand("%") !~ "MERGE_EDITMSG"
\ && expand("%") !~ "ADD_EDIT.patch"
\ && expand("%") !~ "addp-hunk-edit.diff"
\ && expand("%") !~ "git-rebase-todo" |
\ exe "normal g`\"" |
\ endif
autocmd BufNewFile,BufRead *.patch set filetype=diff
autocmd BufNewFile,BufRead *.diff set filetype=diff
autocmd Syntax diff
\ highlight WhiteSpaceEOL ctermbg=red |
\ match WhiteSpaceEOL /\(^+.*\)\@<=\s\+$/
autocmd Syntax gitcommit setlocal textwidth=74
endif " has("autocmd")
set nu
set tabstop=2
set softtabstop=2
set backspace=2
set shiftwidth=2
set autoindent
set showmatch "代码匹配
set ignorecase "检索时忽略大小写
set fileencodings=uft-8
set helplang=cn "帮助系统设置为中文
set encoding=utf-8
set whichwrap=b,s,\<,\>,[,],l,h
自定义 vim的更多相关文章
- 自定义vim配置文件vimrc,用于c/c++编程
vim作为Linux下广受赞誉的代码编辑器,其独特的纯命令行操作模式可以很大程度上方便编程工作,通过自定义vim配置文件可以实现对vim功能的个性化设置. vim配置文件一般有两份,属于root的/e ...
- Linux vim编辑器使用详解
在Linux中,主要编辑器为vi或者vim,本文围绕vim做简单的讲解说明: Linux默认自带vi(vim)编辑器,其程序包为: [root@xuegod163 ~]# rpm -qf `--1.8 ...
- Linux Vim编辑器使用简单讲解
在Linux中,主要编辑器为vi或者vim,本文围绕vim做简单的讲解说明:Linux默认自带vi(vim)编辑器,其程序包为:[root@linuxidc.com ~]# rpm -qf `whic ...
- vim 学习相关记录
VIM 相关内容****************** vim 的三个模式: 编辑模式 --> 输入模式 --> 末行模式 编辑模式: 通常键入键盘值被理解成一个操作; 如: dd(删除行) ...
- Linux高级运维 第五章 Vim编辑器和恢复ext4下误删除的文件-Xmanager工具
5.1 vim主要模式介绍,vim命令模式. 确保系统已经安装了VIM工具 [root@panda ~]# rpm -qf `which vim` [root@panda ~]# rpm -qf ` ...
- Linux中vim文本编辑器的介绍和使用方法
vim主要模式介绍,vim命令模式. 确保系统已经安装了VIM工具 [root@panda ~]# rpm -qf `which vim` [root@panda ~]# rpm -qf `which ...
- centos vim编辑器 第八节课
centos vim编辑器 第八节课 其他编辑器: nanogeditemacs 腾讯云上的vim版本~ VIM - Vi IMproved ~ ~ version 7.4.629 ~ by Br ...
- 东拼西凑 vim配置-更新
"============================================================= "========================== ...
- Linux命令之vim(二)
这一章主要介绍vim编辑器的内部使用方法和注意事项 vim编辑器有四种工作模式:正常模式.插入模式.命令模式.可视模式.简单的判断方法就是看底部,什么都没有就是正常模式,光标在编辑器最底下时则是命令模 ...
随机推荐
- 分布式文件系统---GlusterFS
1.1 分布式文件系统 1.1.1 什么是分布式文件系统 相对于本机端的文件系统而言,分布式文件系统(英语:Distributed file system, DFS),或是网络文件系统(英语:Netw ...
- [Python设计模式] 第11章 迪米特法则——最少知识原则
github地址:https://github.com/cheesezh/python_design_patterns 迪米特法则 迪米特法则(LoD),也叫最少知识原则,如果两个类不必彼此直接通信, ...
- 微软BI 之SSIS 系列 - 两种将 SQL Server 数据库数据输出成 XML 文件的方法
开篇介绍 在 SSIS 中并没有直接提供从数据源到 XML 的转换输出,Destination 的输出对象有 Excel File, Flat File, Database 等,但是并没有直接提供 X ...
- Ubuntu16.04下安装搭配Python3.6相关配置软件方法
1 安装Python3.6.4 此处推荐直接安装Anaconda3,来实现Python3.6.4的环境配置. Anaconda3下载链接:https://www.anaconda.com/downlo ...
- Oracle更改redo log大小 or 增加redo log组
(1)redo log的大小可以影响 DBWR 和 checkpoint : (2)arger redo log files provide better performance. Undersize ...
- VS中项目的循环引用的问题
这个道理很简单,要编译A,首先要编译A引用的项目B,要编译项目B,必须首先编译B引用的项目A. 那么你说应该先编译哪个项目. 如果你非要循环引用,你不要让A引用项目B,而是直接引用项目B生成的b.dl ...
- Seaslog安装和参数配置
详细文档访问:https://github.com/Neeke/SeasLog/blob/master/README_zh.md 源码安装步骤: 1.先下载Seaslog源码,下载地址:http:// ...
- curl重写php file_get_contents
file_get_contents在连接不上的时候会提示Connection refused,有时候会带来不便:另外,curl的性能比file_get_contents高,所以用curl重写file_ ...
- Android 使用WebView加载含有Canvas的页面截屏处理
无法截屏主要原因是webview渲染方式所导致:只需要AndroidManifest.xml中设置属性Android:hardwareAccelerated=”false”.
- 针对个别utf8编码站点在iis7上浏览器编码不能自动识别的解决方法
个别utf8编码站点在iis7上客户端浏览器编码不能自动识别的编号,输入仍为gbk2312,而不是utf-8,这样导致我们看到的网站为乱码. 要解决这个问题,有两个方法,一为打开网站以后,右键,选择编 ...