From 7b24ca51522bbac03b96d61ac0d41201c68475be Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 22 Dec 2016 10:43:26 -0800 Subject: [PATCH] Initial unfinished nvimrc --- .config/nvim | 1 - .config/nvim/init.vim | 108 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) delete mode 120000 .config/nvim create mode 100644 .config/nvim/init.vim diff --git a/.config/nvim b/.config/nvim deleted file mode 120000 index 66012c1..0000000 --- a/.config/nvim +++ /dev/null @@ -1 +0,0 @@ -/Users/hunner/.vim \ No newline at end of file diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..940fe5b --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,108 @@ +call plug#begin() +Plug 'tpope/vim-fugitive' +Plug 'simnalamburt/vim-mundo' +Plug 'easymotion/vim-easymotion' +Plug 'vim-scripts/Align' +Plug 'neomake/neomake' | Plug 'dojoteef/neomake-autolint' +Plug 'Shougo/neosnippet.vim' +Plug 'Shougo/neosnippet-snippets' +Plug 'Shougo/deoplete.nvim' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' +Plug 'junegunn/vim-easy-align' +Plug 'dietsche/vim-lastplace' +Plug 'itchyny/lightline.vim' +Plug 'jacoborus/tender.vim' +Plug 'ciaranm/inkpot' +Plug 'twerth/ir_black' +Plug 'rodjek/vim-puppet' +call plug#end() + +" Because. +noremap : +let mapleader = "," + +nnoremap :MundoToggle +" +(s)earch, (w)ord for jumping +noremap f :Files +noremap F :Files %:p:h +noremap v :GFiles +noremap b :Buffers +noremap h :History +noremap gc :Commits +noremap gb :BCommits +noremap c :ChangeDir +"noremap u :FufRenewCache +"noremap w :bdelete +noremap / :Ag +noremap :Helptags + +function s:get_buffer_git_root(...) + let root = fugitive#repo().tree(expand('%:p:h')) + if empty(root) + return s:warn('Not in git repo') + endif + return fzf#run('bfiles', { + \ 'source': 'git ls-files', + \ 'dir': root, + \ 'options': '-m --prompt "GitFiles> "' + \}, a:000) +endfunction +command! -bar -bang BFiles + \ call s:get_buffer_git_root(0) + +function! s:changedir(...) + return s:fzf('changedir', { + \ 'source': 'find ~ -type d -print', + \ 'options': '-m --prompt "Dir> "' + \}, a:000) +endfunction +command! -bar -bang ChangeDir + \ call fzf#run(fzf#wrap('changedir', { + \ 'dir': '~', + \ 'source': 'find . -type d', + \ 'sink': 'cd' + \ }, 0)) + +" 24-bit blue/orange theme +colorscheme tender +let g:lightline = { + \ 'colorscheme': 'tenderplus', + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '', 'right': '' } + \ } + +noremap tn :color tender +noremap ip :color inkpot +noremap ir :color ir_black + +" Undo files in undodir=~/.local/share/nvim/undo/ +set undofile + +" Case insensitivity for searching +set ignorecase +set infercase + +" C-c and are not entirely the same, but I want them to be +inoremap + +" Scrolling with arrows controls the window +noremap +noremap + +" Movement between windows with ^hjkl +nmap h +nmap h +nmap j +nmap k +nmap l + +" Insert pry line +noremap pry orequire'pry';binding.pry +noremap PRY Orequire'pry';binding.pry + +" Clear search highlights with +nnoremap :noh + +" Show tabs and trailing whitespace visually {{{2 +set list listchars=tab:»·,trail:·,extends:…,nbsp:‗