Commit 60a3d2d3 authored by Tim van Deurzen's avatar Tim van Deurzen

Initial commit.

parents
# Configurations
These are my configurations that I want to use across my devices.
## Available configurations
- NeoVim
" vimrc {{{
augroup vimrc
au BufReadPre * setlocal foldmethod=syntax
au BufWinEnter * if &fdm == 'syntax' | setlocal foldmethod=marker | endif
augroup END
" }}}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" NeoVim Config
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Package Management {{{
if &compatible
set nocompatible
endif
set runtimepath+=$HOME/.config/nvim/bundle/dein.vim
call dein#begin('$HOME/.config/nvim/bundle/dein.vim')
" Management
call dein#add('Shougo/dein.vim')
call dein#add('tbknl/vimproject')
" Completion
call dein#add('Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' })
" VimLang
call dein#add('Shougo/neco-vim', {'on_ft': 'vim'})
call dein#add('ujihisa/neco-look')
" Python
call dein#add('zchee/deoplete-jedi')
" Go
call dein#add('zchee/deoplete-go', {'build': 'make'},{'on_ft': 'go'})
" CPP
call dein#add('zchee/deoplete-clang', {'on_ft': 'cpp'})
call dein#add('vdeurzen/ale')
" UI
call dein#add('morhetz/gruvbox')
call dein#add('ervandew/supertab')
call dein#add('mhartington/oceanic-next')
call dein#add('mkarmona/colorsbox')
call dein#add('vim-airline/vim-airline')
call dein#add('ntpeters/vim-better-whitespace')
call dein#add('ryanoasis/vim-devicons')
call dein#add('Yggdroot/indentLine')
call dein#add('haya14busa/incsearch.vim')
" Language Support
call dein#add('fatih/vim-go', {'on_ft': 'go'})
call dein#add('octol/vim-cpp-enhanced-highlight')
" Utilities
call dein#add('majutsushi/tagbar')
call dein#add('tpope/vim-fugitive')
call dein#add('Raimondi/delimitMate')
call dein#add('tpope/vim-commentary')
call dein#add('scrooloose/nerdtree')
call dein#add('Xuyuanp/nerdtree-git-plugin')
call dein#add('Chiel92/vim-autoformat')
call dein#add('Shougo/unite.vim')
call dein#add('Shougo/Denite.nvim')
call dein#add('Shougo/vimproc.vim', {'build' : 'make'})
call dein#end()
if dein#check_install()
call dein#install()
endif
filetype plugin indent on
" }}}
" General {{{
set fileformats=unix,mac,dos
set modeline
set modelines=5
set whichwrap+=<,>,h,l
set mouse=a
" When joining lines, join the spaces too
set joinspaces
" Search options
set incsearch
set hlsearch
set ignorecase
set smartcase
let g:python_host_prog="/usr/bin/python2"
let g:python3_host_prog="/usr/bin/python3"
" }}}
" History {{{
set history=1000
set undofile
set undodir=$HOME/.config/nvim/undo
set undolevels=1000
" }}}
" Formatting {{{
set comments=s1:/*,mb:*,ex:*/,://,b:#,:%,s1:{-,mb:-,ex:-},:--
set formatoptions=qroctn
" }}}
" Indentation {{{
set shiftwidth=4
set tabstop=4
set shiftround
set expandtab
set autoindent
set copyindent
set smarttab
set softtabstop=4
" }}}
" Folding {{{
autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif
set foldmethod=syntax
set foldlevel=0
" }}}
" Includes {{{
source $HOME/.config/nvim/keyboard.vimrc
source $HOME/.config/nvim/ui.vimrc
source $HOME/.config/nvim/plugin-config.vimrc
source $HOME/.config/nvim/autogroups.vimrc
source $HOME/.config/nvim/unite-git.vimrc
" }}}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Keyboard Settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set backspace=indent,eol,start
set winaltkeys=no
" Make the keyboard layout appear as QWERTY though set-up as Colemak
set langmap=rs,RS,gt,GT,fe,FE,pr,PR,jy,JY,lu,LU,ui,UI,yo,YO,sd,SD,dg,DG,nj,NJ,ek,EK,il,IL,kn,KN,o\\;,O\:,\\;p
set langnoremap
let mapleader=","
map <leader>s :source ~/.config/nvim/init.vim<cr>
map <leader>e :sp! ~/.config/nvim/init.vim<cr>
autocmd! bufwritepost ~/.config/nvim/init.vim source ~/.config/nvim/init.vim
map gr :tabp<cr>
" Disable EX mode.
nnoremap Q <nop>
" Plugin specific keyboard settings {{{
nmap <F8> :TagbarToggle<CR>
let g:SuperTabDefaultCompletionType = "<c-x><c-o>"
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" Git From Unite
nnoremap <silent> <F10> :Unite -direction=botright -silent -buffer-name=git -start-insert menu:git<CR>
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
" }}}
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" Plugin configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim-Airline {{{
let g:airline_theme='gruvbox'
let g:airline_powerline_fonts=1
" }}}
" YouCompleteMe (disabled) {{{
" let g:ycm_min_num_of_chars_for_completion=3
" let g:ycm_auto_start_csharp_server=0
" let g:ycm_register_as_syntastic_checker=1
" let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
" }}}
" Tagbar {{{
let g:tagbar_type_php={
\ 'kinds' : [
\ 'i:interfaces',
\ 'c:classes',
\ 'd:constant definitions:0:0',
\ 'f:functions',
\ 'j:javascript functions',
\ ],
\ }
" }}}
" Ctrl-P {{{
" }}}
" deoplete {{{
let g:deoplete#enable_at_startup = 1
" Omnifunction config
let g:deoplete#omni#functions = {}
" let g:deoplete#omni#functions.cpp = []
let g:deoplete#sources = {}
" let g:deoplete#sources['cpp'] = ['buffer']
" }}}
" AG {{{
let g:ackprg = 'ag --nogroup --nocolor --column'
" }}}
" Ale {{{
" }}}
" deoplete-clang {{{
let g:deoplete#sources#clang#libclang_path = "/usr/lib/libclang.so"
let g:deoplete#sources#clang#clang_header = "/usr/include/clang"
let g:deoplete#sources#clang#clang_complete_database = "./compile_commands.json"
" }}}
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" UI configuration
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax on
colorscheme gruvbox
let g:gruvbox_contrast_dark="hard"
" Truecolor support in the terminal
set termguicolors
set background=dark
set ttyfast
set lazyredraw
set listchars=tab:>-
set nolist
set showcmd
set number
set relativenumber
set cursorline
set nowrap
set ruler
set rulerformat=%l/%L:%c
set textwidth=79
set equalalways
set splitbelow
set splitright
set wildmenu
set wildignore=*.o,*.class,*.hi,*.pdf,*.git,*.blg,*.bbl,*.aux,*.gcno,*.gcda
"set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l/%L:%c
set showmode
set laststatus=2
set scrolloff=7
set cmdheight=2
set tabpagemax=100
" Ensure better behaviour within tmux and for neovim.
set timeout
set timeoutlen=0
set ttimeout
set ttimeoutlen=0
set completeopt=menuone
set completeopt-=preview
" Git from Unite {{{
let g:unite_source_menu_menus = {} " Useful when building interfaces at appropriate places
let g:unite_source_menu_menus.git = {
\ 'description' : 'Fugitive interface',
\}
let g:unite_source_menu_menus.git.command_candidates = [
\[' git status', 'Gstatus'],
\[' git diff', 'Gvdiff'],
\[' git commit', 'Gcommit'],
\[' git stage/add', 'Gwrite'],
\[' git checkout', 'Gread'],
\[' git rm', 'Gremove'],
\[' git cd', 'Gcd'],
\[' git push', 'exe "Git! push " input("remote/branch: ")'],
\[' git pull', 'exe "Git! pull " input("remote/branch: ")'],
\[' git pull rebase', 'exe "Git! pull --rebase " input("branch: ")'],
\[' git checkout branch', 'exe "Git! checkout " input("branch: ")'],
\[' git fetch', 'Gfetch'],
\[' git merge', 'Gmerge'],
\[' git browse', 'Gbrowse'],
\[' git head', 'Gedit HEAD^'],
\[' git parent', 'edit %:h'],
\[' git log commit buffers', 'Glog --'],
\[' git log current file', 'Glog -- %'],
\[' git log last n commits', 'exe "Glog -" input("num: ")'],
\[' git log first n commits', 'exe "Glog --reverse -" input("num: ")'],
\[' git log until date', 'exe "Glog --until=" input("day: ")'],
\[' git log grep commits', 'exe "Glog --grep= " input("string: ")'],
\[' git log pickaxe', 'exe "Glog -S" input("string: ")'],
\[' git index', 'exe "Gedit " input("branchname\:filename: ")'],
\[' git mv', 'exe "Gmove " input("destination: ")'],
\[' git grep', 'exe "Ggrep " input("string: ")'],
\[' git prompt', 'exe "Git! " input("command: ")'],
\] " Append ' --' after log to get commit info commit buffers
"}}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment