Skip to content

Instantly share code, notes, and snippets.

@TheDataLeek
Created February 15, 2016 22:30
Show Gist options
  • Select an option

  • Save TheDataLeek/f237552d99ac9062f11b to your computer and use it in GitHub Desktop.

Select an option

Save TheDataLeek/f237552d99ac9062f11b to your computer and use it in GitHub Desktop.
init.vim for NeoVim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Initialize Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin('~/.config/nvim/bundle')
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Setup Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-scripts/spellcheck.vim'
Plugin 'flazz/vim-colorschemes'
Plugin 'godlygeek/tabular'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'gerw/vim-latex-suite'
Plugin 'Valloric/YouCompleteMe'
Plugin 'euclio/vim-markdown-composer'
Plugin 'itchyny/lightline.vim'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Finalize Vundle
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call vundle#end()
filetype plugin indent on
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Generic Configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Line Numbering
set number
" Textwidth
set tw=120
" Set Spelling
set spell
" Don't wrap text
set nowrap
" Set keytimeout
" http://www.johnhawthorn.com/2012/09/vi-escape-delays/
set timeoutlen=1000 ttimeoutlen=0
" Set C-d and C-u to move up and down one line at a time
" http://vimdoc.sourceforge.net/htmldoc/scroll.html
set scroll=1
" Set width of fold column
" http://vimdoc.sourceforge.net/htmldoc/fold.html
set foldcolumn=1
" Highlight current line
set cursorline
" Python comment out line
map <F9> 0i#<Esc>
" Bind semicolon to colon
nmap ; :
" Align equals signs
vmap t :Tabularize /=<Enter>
" Set characters for tabs and trailing whitespace
set list listchars=tab:▸\ ,trail:⋅,nbsp:⋅
"""""""""""""""""""""""""""""""""""""""""
" Coloring Config
"""""""""""""""""""""""""""""""""""""""""
" Turn on syntax coloring
syntax on
" Use this colorscheme
colorscheme jellybeans
" Folded section color
hi Folded ctermfg=darkblue ctermbg=gray " Fold colors
hi FoldColumn ctermfg=darkblue ctermbg=None " Foldcolumn colors
" Setup normal coloring for everything (we want it to be clear)
hi Normal guibg=NONE ctermbg=NONE
hi NonText ctermbg=None
"""""""""""""""""""""""""""""""""""""""""
" Arrow Keys
"""""""""""""""""""""""""""""""""""""""""
nmap <Left> <<
nmap <Right> >>
vmap <Left> <gv
vmap <Right> >gv
noremap <Up> #
noremap <Down> *
"""""""""""""""""""""""""""""""""""""""""
" Switching between Panes
"""""""""""""""""""""""""""""""""""""""""
noremap H <C-w>h
noremap L <C-w>l
noremap J <C-w>j
noremap K <C-w>k
"""""""""""""""""""""""""""""""""""""""""
" Vim Folding
"""""""""""""""""""""""""""""""""""""""""
au BufWinLeave * silent! mkview
au BufWinEnter * silent! loadview
noremap <Space> za
"""""""""""""""""""""""""""""""""""""""""
" Smart tabbing and cases
"""""""""""""""""""""""""""""""""""""""""
set smartindent
set smartcase " capital letters = case sensitive
set tabstop=4
set shiftwidth=4
set expandtab
"""""""""""""""""""""""""""""""""""""""""
" Markdown Composer
"""""""""""""""""""""""""""""""""""""""""
@Qumeric

Qumeric commented Feb 21, 2016

Copy link
Copy Markdown

nocompatible is the default behaviour of neovim so you need not set it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment