Skip to content

Instantly share code, notes, and snippets.

@jeffschwartz
Created June 1, 2018 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffschwartz/a68fffe7e08917f22679f84ed5bb47ba to your computer and use it in GitHub Desktop.
Save jeffschwartz/a68fffe7e08917f22679f84ed5bb47ba to your computer and use it in GitHub Desktop.
Neovim init.vim configuration file
" {{ Plugins via vim-plug
" 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')
" Surround plugin
Plug 'tpope/vim-surround'
" Cobalt2 color scheme plugin
Plug 'herrbischoff/cobalt2.vim'
" Initialize plugin system
call plug#end()
" }}
" copy & paste to the clipboard
set clipboard=unnamedplus
" colorscheme
colorscheme cobalt2
" support gui colors
set termguicolors
" {{ Automatic toggling between line number modes
set number relativenumber
augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
augroup END
" }}
" display the ruler in the status bar
set ruler
" {{ hybrid cursor support
set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
\,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor
\,sm:block-blinkwait175-blinkoff150-blinkon175
" }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment