From 1475695f42dfb694f962adbdffc6e5cad162cc25 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado <55825613+luevano@users.noreply.github.com> Date: Thu, 20 Feb 2020 20:09:24 -0700 Subject: Refactor vim config --- .config/Dharkael/flameshot.ini | 1 + .config/alacritty/alacritty.yml | 34 ++++++------- .config/nvim/init.vim | 104 ++++++++++++++++++---------------------- 3 files changed, 64 insertions(+), 75 deletions(-) diff --git a/.config/Dharkael/flameshot.ini b/.config/Dharkael/flameshot.ini index ec94e3e..eba4292 100644 --- a/.config/Dharkael/flameshot.ini +++ b/.config/Dharkael/flameshot.ini @@ -5,3 +5,4 @@ disabledTrayIcon=false drawColor=#ff0000 drawThickness=0 filenamePattern=fs_%e%b%Y_%H%M%S +savePath=/home/luevano/pix/ss diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 9492ada..2962089 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -197,20 +197,20 @@ mouse: # - AppCursor # - AppKeypad # - Alt -#key_bindings: - #- { key: V, mods: Control|Shift, action: Paste } - #- { key: C, mods: Control|Shift, action: Copy } - #- { key: Insert, mods: Shift, action: PasteSelection } - #- { key: Key0, mods: Control, action: ResetFontSize } - #- { key: Equals, mods: Control, action: IncreaseFontSize } - #- { key: Add, mods: Control, action: IncreaseFontSize } - #- { key: Subtract, mods: Control, action: DecreaseFontSize } - #- { key: Minus, mods: Control, action: DecreaseFontSize } - #- { key: Paste, action: Paste } - #- { key: Copy, action: Copy } - #- { key: L, mods: Control, action: ClearLogNotice } - #- { key: L, mods: Control, chars: "\x0c" } - #- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } - #- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } - #- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } - #- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } +key_bindings: + - { key: V, mods: Control|Shift, action: Paste} + - { key: C, mods: Control|Shift, action: Copy} + - { key: Insert, mods: Shift, action: PasteSelection} + - { key: Key0, mods: Control, action: ResetFontSize} + - { key: Equals, mods: Control, action: IncreaseFontSize} + - { key: Add, mods: Control, action: IncreaseFontSize} + - { key: Subtract, mods: Control, action: DecreaseFontSize} + - { key: Minus, mods: Control, action: DecreaseFontSize} + - { key: Paste, action: Paste} + - { key: Copy, action: Copy} + - { key: L, mods: Control, action: ClearLogNotice} + - { key: L, mods: Control, chars: "\x0c"} + - { key: K, mods: Shift, action: ScrollPageUp, mode: ~Alt} + - { key: J, mods: Shift, action: ScrollPageDown, mode: ~Alt} + - { key: H, mods: Shift, action: ScrollToTop, mode: ~Alt} + - { key: L, mods: Shift, action: ScrollToBottom, mode: ~Alt} diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 615c550..299d951 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,6 +1,8 @@ " " ~/.config/nvim/init.vim " +let mapleader=',' +set showcmd ""---Auto installs vim-plug---"" " let autoload_plug_path='~/.config/nvim/autoload/plug.vim' @@ -16,24 +18,52 @@ call plug#begin('~/.config/nvim/plugged') " Colorscheme Plug 'altercation/vim-colors-solarized' + " Other Plug 'mboughaba/i3config.vim' Plug 'junegunn/goyo.vim' - " Plug 'preservim/nerdtree' - " Plug 'Xuyuanp/nerdtree-git-plugin' + Plug 'preservim/nerdtree' + let g:NERDTreeShowHidden=1 + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + + "Airline Plug 'vim-airline/vim-airline' + let g:airline_powerline_fonts=1 Plug 'vim-airline/vim-airline-themes' + let g:airline_theme='solarized' + + " Git + Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'mhinz/vim-signify' + set updatetime=100 + + " Auto completion + Plug 'Valloric/YouCompleteMe' + let g:ycm_autoclose_preview_window_after_completion=1 + " TeX Plug 'lervag/vimtex' + let g:tex_flavor='latex' + let g:vimtex_view_method=$READER + let g:vimtex_quickfix_mode=0 Plug 'KeitaNakamura/tex-conceal.vim' + set conceallevel=2 + let g:tex_conceal="abdgm" + " Python Plug 'tmhedberg/SimpylFold' + let g:SympylFold_docstring_preview=1 Plug 'vim-scripts/indentpython.vim' - Plug 'Valloric/YouCompleteMe' Plug 'jmcantrell/vim-virtualenv' Plug 'Yggdroot/indentLine' Plug 'vim-syntastic/syntastic' + " set statusline+=%#warningmsg# + " set statusline+=%{SyntasticStatuslineFlag()} + " set statusline+=%* + let g:syntastic_always_populate_loc_list=1 + let g:syntastic_auto_loc_list=1 + let g:syntastic_check_on_open=1 + let g:syntastic_check_on_wq=0 Plug 'nvie/vim-flake8' call plug#end() "" Commands for plug. @@ -46,15 +76,11 @@ " PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins ""---Basic configuration---"" - " Leader key - let mapleader='\' - set showcmd - - " Basic syntax enable set background=dark colorscheme solarized - hi Normal ctermbg=NONE " Just so alacritty can use transparency. + " Just so alacritty can use transparency. + hi Normal ctermbg=NONE set encoding=utf-8 set number relativenumber set clipboard+=unnamedplus @@ -82,9 +108,8 @@ \ set shiftwidth=4 | \ set textwidth=79 | \ set expandtab | - \ set fileformat=unix | + \ set fileformat=unix au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ - let python_highlight_all=1 " Listchars set showbreak=↪\ @@ -114,71 +139,34 @@ endif endfunction -""---Plugin configuration---"" - " vim-airline - let g:airline_powerline_fonts=1 - - " vim-airline-themes - let g:airline_theme='solarized' - - " vim-signify - set updatetime=100 - - " vimtex - let g:tex_flavor='latex' - let g:vimtex_view_method=$READER - let g:vimtex_quickfix_mode=0 - - " tex-conceal - set conceallevel=2 - let g:tex_conceal="abdgm" - - " NERDTree - " let g:NERDTreeShowHidden=1 - " autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif - - " SympylFold - let g:SympylFold_docstring_preview=1 - - " YouCompleteMe - let g:ycm_autoclose_preview_window_after_completion=1 - - " syntastic - " set statusline+=%#warningmsg# - " set statusline+=%{SyntasticStatuslineFlag()} - " set statusline+=%* - let g:syntastic_always_populate_loc_list=1 - let g:syntastic_auto_loc_list=1 - let g:syntastic_check_on_open=1 - let g:syntastic_check_on_wq=0 - -""---Keybindings---"" +""---Vanilla vim keybindings---"" " Reload vim nmap :source ~/.config/nvim/init.vim " Toggle relative line number nmap :set number invrelativenumber - " Toggle NERDTree - " nmap :NERDTreeToggle - - " Toggle Goyo - nmap :Goyo - " Split navigation map h map j map k map l + " Enable folding with the spacebar + nnoremap za + " Spell checking map s :call ToggleSpellCheck() " List chars map c :call ToggleListChars() - " Enable folding with the spacebar - nnoremap za +""---Plugin keybindings---"" + " Toggle NERDTree + nmap :NERDTreeToggle + + " Goyo + nmap :Goyo " YouCompleteMe map g :YcmCompleter GoToDefinitionElseDeclaration -- cgit v1.2.3-54-g00ecf