init.vim (2990B)
1 let mapleader ="," 2 3 call plug#begin('~/.config/nvim/plugged') 4 "Plug 'tpope/vim-surround' 5 Plug 'neoclide/coc.nvim', {'branch': 'release'} 6 Plug 'preservim/nerdtree' 7 "Plug 'ryanoasis/vim-devicons' 8 "Plug 'junegunn/goyo.vim' 9 "Plug 'jreybert/vimagit' 10 "Plug 'vimwiki/vimwiki' 11 Plug 'bling/vim-airline' 12 Plug 'vim-airline/vim-airline-themes' 13 Plug 'tpope/vim-fugitive' 14 "Plug 'tpope/vim-commentary' 15 "Plug 'kovetskiy/sxhkd-vim' 16 "Plug 'ap/vim-css-color' 17 Plug 'airblade/vim-gitgutter' 18 Plug 'PyGamer0/vim-apl', { 'branch': 'main' } 19 Plug 'mlochbaum/BQN', {'rtp': 'editors/vim'} 20 Plug 'git@git.sr.ht:~detegr/nvim-bqn' 21 call plug#end() 22 23 "set bg=light 24 "set go=a 25 "set mouse=a 26 set nohlsearch 27 set expandtab 28 set tabstop=4 29 "set clipboard+=unnamedplus 30 31 let g:airline_theme='violet' 32 let g:airline_powerline_fonts=1 33 let g:airline#extensions#hunks#enabled=1 34 let g:airline#extensions#branch#enabled=1 35 36 if !exists('g:airline_symbols') 37 let g:airline_symbols={} 38 endif 39 40 " airline symbols 41 let g:airline_left_sep='' 42 let g:airline_left_alt_sep='' 43 let g:airline_right_sep='' 44 let g:airline_right_alt_sep='' 45 let g:airline_symbols.branch='' 46 let g:airline_symbols.readonly='∅' 47 let g:airline_symbols.colnr = ' ⍆' 48 let g:airline_symbols.linenr = ' ⍖' 49 let g:airline_symbols.maxlinenr = ' ¶ ' 50 let g:airline_symbols.dirty='' 51 let g:airline_symbols.crypt = '🔒' 52 let g:airline_symbols.notexists = ' ∉' 53 54 " Some basics: 55 "nnoremap c "_c 56 set nocompatible 57 filetype plugin on 58 syntax on 59 set encoding=utf-8 60 set number relativenumber 61 " Enable autocompletion: 62 set wildmode=longest,list,full 63 " Disables automatic commenting on newline: 64 autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o 65 66 highlight! link SignColumn LineNr 67 " Goyo plugin makes text more readable when writing prose: 68 "map <leader>f :Goyo | set bg=light | set linebreak<CR> 69 70 " Spell-check set to <leader>o, 'o' for 'orthography': 71 "map <leader>o :setlocal spell! spelllang=en_us<CR> 72 73 " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. 74 set splitbelow splitright 75 76 " Nerd tree 77 nmap <C-n> :NERDTreeToggle<CR> 78 79 " Shortcutting split navigation, saving a keypress: 80 map <C-h> <C-w>h 81 map <C-j> <C-w>j 82 map <C-k> <C-w>k 83 map <C-l> <C-w>l 84 85 " Check file in shellcheck: 86 "map <leader>s :!clear && shellcheck %<CR> 87 88 " Replace all is aliased to S. 89 nnoremap S :%s//g<Left><Left> 90 91 " Save file as sudo on files that require root permission 92 cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! 93 94 " Automatically deletes all trailing whitespace and newlines at end of file on save. 95 "autocmd BufWritePre * %s/s+$//e 96 "autocmd BufWritepre * %s/n+%$//e 97 98 " When shortcut files are updated, renew bash and ranger configs with new material: 99 "autocmd BufWritePost files,directories !shortcuts 100 101 " Run xrdb whenever Xdefaults or Xresources are updated. 102 autocmd BufWritePost *Xresources,*Xdefaults !xrdb % 103 autocmd BufWritePost * GitGutter