可以使用简单的 linux 下 neovim 配置,增加了对 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-align
Plug 'junegunn/vim-easy-align' " Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git' " Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
Plug 'isRuslan/vim-es6' | Plug 'mxw/vim-jsx' " On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' } "comments-auto
Plug 'scrooloose/nerdcommenter' " Using a non-master branch
Plug '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 hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } " Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin' "theme color
Plug 'tomasr/molokai' | Plug 'altercation/solarized' "Fuzzy file, buffer, mru, tag, etc finder.
Plug 'kien/ctrlp.vim' "multiple selections
Plug 'terryma/vim-multiple-cursors' "Highlights trailing whitespace
Plug 'bronson/vim-trailing-whitespace' "emmet quick-html
Plug 'mattn/emmet-vim' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" plugin settings "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set nocompatible let mapleader=";" " Initialize plugin system
call plug#end() filetype plugin indent on "NerdTree ####
map <C-t> :NERDTreeToggle<CR> "ctrlp ####
let g:ctrlp_map = '<c-p>'
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="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>" "nerdcommenter ####
let g:NERDSpaceDelims = 1
let g:NERDTrimTrailingWhitespace = 1 "vim-easy-align ####
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign) "vim-jsx ####
let g:jsx_ext_required = 0 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" common setting "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set showcmd set background=dark
set t_Co=256
colorscheme molokai
set number set autoindent
set smartindent
set showmatch
set ignorecase set cursorline set incsearch set display+=lastline set guifont=Inconsolata:h15:cANSI set tabstop=2
set shiftwidth=2
set expandtab set nobackup
set noswapfile
set history=1024
set autochdir
set whichwrap=b,s,<,>,[,]
set nobomb
set 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 <leader>s :update<CR>
vmap <leader>s :update<CR>
inoremap <C-BS> <Esc>bdei
nnoremap <C-left> :bn<CR>
nnoremap <C-right> :bp<CR> nnoremap <leader>a ^
vnoremap <leader>a ^ inoremap <leader>a ^
nnoremap <leader>n $
vnoremap <leader>n $ inoremap <leader>n $ nmap <leader>tn :tabnew<cr>
nmap <leader>tc :tabclose<cr>
nmap <leader>th :tabp<cr>
nmap <leader>tl :tabn<cr> " 移动分割窗口
nmap <C-j> <C-W>j
nmap <C-k> <C-W>k
nmap <C-h> <C-W>h
nmap <C-l> <C-W>l " 正常模式下 alt+j,k,h,l 调整分割窗口大小
nnoremap <M-j> :resize +5<cr>
nnoremap <M-k> :resize -5<cr>
nnoremap <M-h> :vertical resize -5<cr>
nnoremap <M-l> :vertical resize +5<cr> " 插入模式移动光标 alt + 方向键
inoremap <M-j> <Down>
inoremap <M-k> <Up>
inoremap <M-h> <left>
inoremap <M-l> <Right> " Don't use Ex mode, use Q for formatting
noremap Q gq " trailling whitespace
nnoremap <leader>d :%s/\s\+$//<cr>:let @/=''<CR> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 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 "\<binding.pry\>"
au BufEnter *.rb syn match error contained "\<debugger\>"
au BufEnter *.js syn match error contained "\<debugger\>"
au BufEnter *.coffee syn match error contained "\<debugger\>"
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
endif
endfunction function! InsertLeaveActions()
hi statusline guibg=green
set nocursorline
endfunction au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertLeave * call InsertLeaveActions()

end

windows 上的 neovim 配置的更多相关文章

  1. PHP 1:在Windows上安装和配置PHP,Apache和My SQL

    原文:PHP 1:在Windows上安装和配置PHP,Apache和My SQL 如果你Google一把类似的主题,你会发现相关的文章可以塞满你的硬盘.在这里之所以把它再次拿出来,目的是想记录我作为一 ...

  2. Windows上为Apache配置HTTPS

    Windows上为Apache配置HTTPS   转 https://www.cnblogs.com/tianzijiaozi/p/7582671.html   1. 安装OpenSSL: Windo ...

  3. Windows上PostgreSQL安装配置教程

    Windows上PostgreSQL安装配置教程 这篇文章主要为大家详细介绍了Windows上PostgreSQL安装配置教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 PostgreSQL的 ...

  4. 图文介绍openLDAP在windows上的安装配置

    目录 概述 测试环境 安装过程 配置启动 客户端介绍 多级DC的ldif文件的配置 [一].概述 什么叫LDAP呢,概念的东西这里就不多讲了,网上搜索下有很多,本文的重点是介绍如何在windows平台 ...

  5. 在Windows上安装和配置Jenkins

    一.windows上安装Jenkins 1.官网下载Jenkins安装包Jenkins.msi ,进入安装模式,选择默认配置,安装完成之后,就会默认打开浏览器 http://localhost:808 ...

  6. jinkins在windows上的安装 配置C#编译

    首先jinkins在windows上的安装就不说,安装只需要下载相应安装包就可以了,后有些时候经常需要修改端口号.修改如下: 然后重启jenkins服务 首次运行界面 个人建议插件按需安装. 建立一个 ...

  7. Jenkins在windows上的安装配置

     今天是2月14号,所谓西方情人节,下班回来发现,2月14过的比七夕还火热.于是上网百度百科查询了"情人节". 毕竟是中国的百度啊.是这么解释的.我感到很欣慰.过得每一个节日都应该 ...

  8. mongo在centos与windows上部署与配置,及远程连接mongo与数据用户和角色分配

    1.下载mongodb社区版: windows 安装包安装: https://www.mongodb.com/download-center#community(mongo下载中心) 配置环境变量 控 ...

  9. yaf框架在windows上的环境配置和安装

    1.首先检测你的php版本 如图:Architecture:×86和thread Safety:disabled 这个有什么用呢? 2.进入这个网站 tgz是linux下的扩展包,windows下点D ...

随机推荐

  1. WPF Dispatcher介绍

    微软在WPF引入了Dispatcher,那么这个Dispatcher的主要作用是什么呢?Dispatcher的作用是用于管理线程工作项队列.主线程负责接收输入.处理事件.绘制屏幕等工作,这样一来,UI ...

  2. CentOS 6.5系统上安装SVN服务器端的方法及目录访问权限配置(转总结)

    SVN其实就是Subversion,分为服务器端和客户端.之前在网上搜了很多方法,都有各种问题,经过自己搜集整理以及实际尝试,总算有个比较靠谱的方法.本文主要介绍CentOS 6.5系统上安装SVN服 ...

  3. redis 连接 docker容器 6379端口失败

    redis部署在docker容器中Could not connect to Redis 容器内redis-cli是可以直接连上的,但是在另一台服务器上就不能用外网ip来连了 虽然我创建redis容器时 ...

  4. 详解nginx 配置多个tomcat共用80端口

    场景:项目1放在tomcat1中,项目2放在tomcat2中,两个tomcat放在同一台服务器上,需要共享80端口访问注意:这里和集群部署是不同的,集群部署是一个项目放在多个tomcat中.这里通过n ...

  5. Atitit 类库冲突 解决方案

    Atitit 类库冲突 解决方案 表现情况,找到不某些方法 类等,一个情况是真的找不到,一个情况是加载了错误的jar,导致正确的jar无法加载.. 1.1. 查找现在ide正在使用的jar1 1.2. ...

  6. “RESOURCE MONITOR“CPU占用特别高

    背景: SQL Server 2008 R2 10.50.1600 没有设置页面文件,内存为64G,数据库分配50G cpu使用占了50%以上,平时只有10-20%,某台服务器“RESOURCE MO ...

  7. layui表单验证

    layui表单元素的校验只需在元素上加入lay-verify,layui提供了以下值. required(必填项) phone(手机号) email(邮箱) url(网址) number(数字) da ...

  8. 将png图片转换为字体图标

    字体图标不仅可以随意调整大小,而且可以避免在页面制作过程中引用N多的图片,发送请求造成的流量浪费,因此,我们可以将图标的icon转换成字体图标: 方法一: 1.将png格式的图片转换成svg格式: 网 ...

  9. 为11.2.0.2 Grid Infrastructure添加节点

    转自:http://www.askmaclean.com/archives/add-node-to-11-2-0-2-grid-infrastructure.html 在之前的文章中我介绍了为10g ...

  10. JVM:从实际案例聊聊Java应用的GC优化

    原文转载自美团从实际案例聊聊Java应用的GC优化,感谢原作者的贡献 当Java程序性能达不到既定目标,且其他优化手段都已经穷尽时,通常需要调整垃圾回收器来进一步提高性能,称为GC优化.但GC算法复杂 ...