init.vim (1614B)
1 syntax on 2 3 " Sets file format and encoding 4 set fileformat=unix 5 set encoding=UTF-8 6 7 " Highlights the current line 8 highlight CursorLine guibg=#5f0087 9 set cursorline 10 11 " Enable search highlighting 12 set hlsearch 13 14 " Show the status bar 15 set laststatus=2 16 17 " Tab and indentation settings 18 set tabstop=2 19 set softtabstop=2 20 set shiftwidth=2 21 set expandtab 22 set autoindent 23 set smartindent 24 set smarttab 25 26 " Line numbering 27 set number 28 set relativenumber 29 30 " Keep 8 lines visible above/below the cursor when scrolling 31 set scrolloff=8 32 33 " Improved split navigation 34 nnoremap <C-h> <C-w>h 35 nnoremap <C-j> <C-w>j 36 nnoremap <C-k> <C-w>k 37 nnoremap <C-l> <C-w>l 38 39 augroup reload_vimrc 40 autocmd! 41 autocmd BufWritePost init.vim source $MYVIMRC 42 augroup END 43 44 " Use system clipboard 45 set clipboard=unnamedplus 46 47 call plug#begin('~/.config/nvim/plug') 48 49 " List your plugins here 50 Plug 'junegunn/goyo.vim', { 'for': 'markdown' } 51 Plug 'vimwiki/vimwiki' 52 53 54 call plug#end() 55 56 " Vimwiki settings 57 let g:vimwiki_list = [{ 58 \ 'path': '~/Documents/Notes/', 59 \ 'syntax': 'markdown', 60 \ 'ext': '.md' 61 \ }] 62 63 64 " Goyo settings 65 function! s:goyo_enter() 66 set noshowmode 67 set noshowcmd 68 set scrolloff=999 69 set linebreak 70 endfunction 71 72 function! s:goyo_leave() 73 if executable('tmux') && strlen($TMUX) 74 silent !tmux set status on 75 silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z 76 endif 77 set showmode 78 set showcmd 79 set scrolloff=5 80 set nolinebreak 81 " ... 82 endfunction 83 84 let g:goyo_width='80%' 85 let g:goyo_height='80%' 86 87 autocmd! User GoyoEnter nested call <SID>goyo_enter() 88 autocmd! User GoyoLeave nested call <SID>goyo_leave()