diff options
author | FivePixels <o5pxels@gmail.com> | 2022-03-11 12:54:51 -0600 |
---|---|---|
committer | FivePixels <o5pxels@gmail.com> | 2022-03-11 12:54:51 -0600 |
commit | 7209844a46a83950c7ea2e5b505d9666c04e9bda (patch) | |
tree | bd03e5e08eae6ac31594a845569cf27ccc9dd3f1 | |
parent | 069fbb622749c571cf47b8880443676880a7a467 (diff) | |
download | dots-7209844a46a83950c7ea2e5b505d9666c04e9bda.tar.xz dots-7209844a46a83950c7ea2e5b505d9666c04e9bda.zip |
Add nvim init.vim
-rw-r--r-- | .config/nvim/init.vim | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..2ce00b1 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,61 @@ +set number +set tabstop=4 +set shiftwidth=4 +set expandtab +set clipboard^=unnamed,unnamedplus +set path+=** + +xnoremap "+y y:call system("wl-copy", @")<cr> +nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p +nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p +nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR> + + +filetype plugin indent on + +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 4 +let g:netrw_altv = 1 +let g:netrw_winsize = 15 + +augroup fileExplore + " If you pass in a file with vim, use v(ertical)explore. Otherwise, + " fullscreen explore. + autocmd! + au VimEnter * if eval("@%") == "" | :Explore | elseif eval("@%") != "" | :Vexplore| endif + " By default, load into the editor (not explorer) if a file is passed. + au VimEnter * :wincmd l +augroup END + +syntax on + +cnoremap sudow w !sudo tee % >/dev/null + +" vim-plug + +call plug#begin('~/.vim/plugged') +Plug 'ap/vim-css-color' +Plug 'junegunn/vim-easy-align' +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-vinegar' +Plug 'junegunn/goyo.vim' +Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } +call plug#end() + +function! s:goyo_enter() + if executable('tmux') && strlen($TMUX) + silent !tmux set status off + silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z + endif + set noshowmode + set noshowcmd + set scrolloff=999 + set linebreak + set wrap + set spell spelllang=en_us + Limelight + " ... +endfunction |