博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
windows 上的 neovim 配置
阅读量:4551 次
发布时间:2019-06-08

本文共 7040 字,大约阅读时间需要 23 分钟。

可以使用简单的 ,增加了对 golang, python,  ruby 脚本文件一键运行快捷方式。

 

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""                                  PlugList                                  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Specify a directory for plugins" - For Neovim: ~/.local/share/nvim/plugged" - Avoid using standard Vim directory names like 'plugin'call plug#begin('~/.local/share/nvim/plugged') " Make sure you use single quotes " Shorthand notation; fetches https://github.com/junegunn/vim-easy-alignPlug 'junegunn/vim-easy-align' " Any valid git URL is allowedPlug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separatorsPlug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'Plug 'isRuslan/vim-es6' | Plug 'mxw/vim-jsx' " On-demand loadingPlug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }Plug 'tpope/vim-fireplace', { 'for': 'clojure' } "comments-autoPlug 'scrooloose/nerdcommenter' " Using a non-master branchPlug 'rdnetto/YCM-Generator', { 'branch': 'stable' } " Using a tagged release; wildcard allowed (requires git 1.9.2 or above) " Plugin outside ~/.vim/plugged with post-update hookPlug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " Unmanaged plugin (manually installed and updated)Plug '~/my-prototype-plugin' "theme colorPlug 'tomasr/molokai' | Plug 'altercation/solarized' "Fuzzy file, buffer, mru, tag, etc finder.Plug 'kien/ctrlp.vim' "multiple selectionsPlug 'terryma/vim-multiple-cursors' "Highlights trailing whitespacePlug 'bronson/vim-trailing-whitespace' "emmet quick-htmlPlug 'mattn/emmet-vim'  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""                              plugin settings                               """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set nocompatible let mapleader=";" " Initialize plugin systemcall plug#end() filetype plugin indent on "NerdTree ####map 
:NERDTreeToggle
"ctrlp ####let g:ctrlp_map = '
'let g:ctrlp_cmd = 'CtrlP'let g:ctrlp_working_path_mode = 'ra'set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe"let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' "ultisnip ####let g:UltiSnipsExpandTrigger="
"let g:UltiSnipsJumpForwardTrigger="
"let g:UltiSnipsJumpBackwardTrigger="
" "nerdcommenter ####let g:NERDSpaceDelims = 1let g:NERDTrimTrailingWhitespace = 1 "vim-easy-align ####xmap ga
(EasyAlign)nmap ga
(EasyAlign) "vim-jsx ####let g:jsx_ext_required = 0 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" common setting """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set showcmd set background=darkset t_Co=256colorscheme molokaiset number set autoindentset smartindentset showmatchset ignorecase set cursorline set incsearch set display+=lastline set guifont=Inconsolata:h15:cANSI set tabstop=2set shiftwidth=2set expandtab set nobackupset noswapfileset history=1024set autochdirset whichwrap=b,s,<,>,[,]set nobombset backspace=indent,eol,start whichwrap+=<,>,[,]" set clipboard+=unnamed set clipboard=unnamed set winaltkeys=no set undofile " keep an undo file (undo changes after closing) set ruler " show the cursor position all the time set showcmd " display incomplete commands set cmdheight=1 " 1 screen lines to use for the command-line set showfulltag " show tag with function protype. set guioptions+=b " present the bottom scrollbar when the longest visible line exceed the window set fileencodings=utf-8,gbk2312,gbk,gb18030,cp936 set encoding=utf-8 set tenc=utf-8 set langmenu=zh_CN let $LANG = 'en_US.UTF-8' syntax on syntax enable set autoread set hlsearch """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" keyboard-binding """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" nmap
s :update
vmap
s :update
inoremap
bdei nnoremap
:bn
nnoremap
:bp
nnoremap
a ^ vnoremap
a ^ inoremap
a ^ nnoremap
n $ vnoremap
n $ inoremap
n $ nmap
tn :tabnew
nmap
tc :tabclose
nmap
th :tabp
nmap
tl :tabn
" 移动分割窗口 nmap
j nmap
k nmap
h nmap
l " 正常模式下 alt+j,k,h,l 调整分割窗口大小 nnoremap
:resize +5
nnoremap
:resize -5
nnoremap
:vertical resize -5
nnoremap
:vertical resize +5
" 插入模式移动光标 alt + 方向键 inoremap
inoremap
inoremap
inoremap
" Don't use Ex mode, use Q for formatting noremap Q gq " trailling whitespace nnoremap
d :%s/\s\+$//
:let @/=''
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " others " """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Put these in an autocmd group, so that we can delete them easily. augroup vimrcEx autocmd! " When editing a file, always jump to the last known cursor position. " Don't do it for commit messages, when the position is invalid, or when " inside an event handler (happens when dropping a file on gvim). autocmd BufReadPost * \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif " Enable spellchecking for Markdown autocmd FileType markdown setlocal spell " Automatically wrap at 80 characters for Markdown autocmd BufRead,BufNewFile *.md setlocal textwidth=80 " Disable wrap on some languages autocmd BufRead,BufNewFile *.slim setlocal textwidth=0 autocmd BufRead,BufNewFile *.erb setlocal textwidth=0 autocmd BufRead,BufNewFile *.html setlocal textwidth=0 " Automatically wrap at 72 characters and spell check git commit messages autocmd FileType gitcommit setlocal textwidth=72 autocmd FileType gitcommit setlocal spell " Allow stylesheets to autocomplete hyphenated words autocmd FileType css,scss,sass setlocal iskeyword+=- " Autocomplete ids and classes in CSS autocmd FileType css,scss set iskeyword=@,48-57,_,-,?,!,192-255 " Add the '-' as a keyword in erb files autocmd FileType eruby set iskeyword=@,48-57,_,192-255,$,- " Auto reload VIM when settings changed autocmd BufWritePost .vimrc so $MYVIMRC autocmd BufWritePost *.vim so $MYVIMRC autocmd BufWritePost vimrc.symlink so $MYVIMRC " Make those debugger statements painfully obvious au BufEnter *.rb syn match error contained "\
" au BufEnter *.rb syn match error contained "\
" au BufEnter *.js syn match error contained "\
" au BufEnter *.coffee syn match error contained "\
"augroup END """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" i & r color setting """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" function! InsertStatuslineColor(mode) if a:mode == 'i' hi statusline guibg=red set cursorline elseif a:mode == 'r' hi statusline guibg=blue else hi statusline guibg= magenta endifendfunction function! InsertLeaveActions() hi statusline guibg=green set nocursorlineendfunction au InsertEnter * call InsertStatuslineColor(v:insertmode)au InsertLeave * call InsertLeaveActions()

 

end

转载于:https://www.cnblogs.com/lemos/p/7325079.html

你可能感兴趣的文章
Eclipse修改已存在的SVN地址
查看>>
C++ ACM基础
查看>>
(转)使用 python Matplotlib 库绘图
查看>>
进程/线程切换原则
查看>>
正则表达式语法
查看>>
20165301 2017-2018-2 《Java程序设计》第四周学习总结
查看>>
Vue的简单入门
查看>>
urllib 中的异常处理
查看>>
【SQL Server高可用性】高可用性概述
查看>>
通过SQL Server的扩展事件来跟踪SQL语句在运行时,时间都消耗到哪儿了?
查看>>
SQL优化:重新编译存储过程和表
查看>>
PCB“有铅”工艺将何去何从?
查看>>
Solr环境搭建
查看>>
垂直居中的几种实现方法
查看>>
UILabel标签文字过长时的显示方式
查看>>
H5离线缓存机制-manifest
查看>>
比较:I/O成员函数getline() 与 get()(第二种用法)的用法异同
查看>>
201671010118 2016-2017-2《Java程序设计》 第十一周学习心得
查看>>
Get Sauce(状压DP)
查看>>
Office2007 升级到 office2010
查看>>