diff options
-rw-r--r-- | .config/i3/config | 4 | ||||
-rw-r--r-- | .config/nvim/init.vim | 123 | ||||
-rwxr-xr-x | .local/bin/pys/xcolors.py | 13 |
3 files changed, 101 insertions, 39 deletions
diff --git a/.config/i3/config b/.config/i3/config index 038713c..f206ea1 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -141,8 +141,8 @@ client.background $c15 bindsym $mod+Shift+q kill bindsym $mod+r mode "resize" floating_modifier $mod - bindsym $mod+g split h - bindsym $mod+v split v + bindsym $mod+Shift+g split h + bindsym $mod+Shift+v split v bindsym $mod+f fullscreen toggle # Focus. diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 3d21058..0b52768 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -13,49 +13,77 @@ " unlet autoload_plug_path ""---Loads plugins---"" -call plug#begin('~/.config/nvim/plugged') - Plug 'mboughaba/i3config.vim' - Plug 'junegunn/goyo.vim' - Plug 'preservim/nerdtree' - Plug 'Xuyuanp/nerdtree-git-plugin' - Plug 'vim-airline/vim-airline' - Plug 'vim-airline/vim-airline-themes' - Plug 'mhinz/vim-signify' - Plug 'jmcantrell/vim-virtualenv' - Plug 'lervag/vimtex' - Plug 'KeitaNakamura/tex-conceal.vim' -call plug#end() -"" Commands for plug. -" PlugInstall [name ...] [#threads] Install plugins -" PlugUpdate [name ...] [#threads] Install or update plugins -" PlugClean[!] Remove unlisted plugins (bang version will clean without prompt) -" PlugUpgrade Upgrade vim-plug itself -" PlugStatus Check the status of plugins -" PlugDiff Examine changes from the previous update and the pending changes -" PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins + call plug#begin('~/.config/nvim/plugged') + Plug 'mboughaba/i3config.vim' + Plug 'junegunn/goyo.vim' + Plug 'preservim/nerdtree' + Plug 'Xuyuanp/nerdtree-git-plugin' + Plug 'vim-airline/vim-airline' + Plug 'vim-airline/vim-airline-themes' + Plug 'mhinz/vim-signify' + Plug 'lervag/vimtex' + Plug 'KeitaNakamura/tex-conceal.vim' + Plug 'tmhedberg/SimpylFold' + Plug 'vim-scripts/indentpython.vim' + Plug 'Valloric/YouCompleteMe' + Plug 'jmcantrell/vim-virtualenv' + Plug 'Yggdroot/indentLine' + Plug 'vim-syntastic/syntastic' + Plug 'nvie/vim-flake8' + call plug#end() + "" Commands for plug. + " PlugInstall [name ...] [#threads] Install plugins + " PlugUpdate [name ...] [#threads] Install or update plugins + " PlugClean[!] Remove unlisted plugins (bang version will clean without prompt) + " PlugUpgrade Upgrade vim-plug itself + " PlugStatus Check the status of plugins + " PlugDiff Examine changes from the previous update and the pending changes + " PlugSnapshot[!] [output path] Generate script for restoring the current snapshot of the plugins ""---Basic configuration---"" + " Leader key + let mapleader='\' + set showcmd + + " Basic set encoding=utf-8 " set bg=dark syntax on set number relativenumber set clipboard+=unnamedplus - + + " Custom colors/highlights + highlight BadWhitespace ctermbg=red " Indentation filetype plugin indent on set tabstop=4 set shiftwidth=4 - + " Spell checking autocmd FileType tex setlocal spell set spelllang=es_mx,en_us - " Leader key - let mapleader='\' - set showcmd + " Folding + set foldmethod=indent + set foldlevel=99 + + " Exclusively for python + au BufNewFile,BufRead *.py + \ set tabstop=4 | + \ set softtabstop=4 | + \ set shiftwidth=4 | + \ set textwidth=79 | + \ set expandtab | + \ set fileformat=unix + au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ + let python_highlight_all=1 -""---Custom functions---"" + " Listchars + set showbreak=↪\ + set listchars=eol:↲,nbsp:␣,tab:»\ ,trail:•,precedes:⟨,extends:⟩ + + ""---Custom functions---"" " Toggle spellchecking function! ToggleSpellCheck() set spell! @@ -66,6 +94,16 @@ call plug#end() endif endfunction + " Toggle listchars + function! ToggleListChars() + set list! + if &list + echo "Listchars ON" + else + echo "Listchars OFF" + endif + endfunction + ""---Plugin configuration---"" " vim-airline let g:airline_powerline_fonts=1 @@ -75,11 +113,11 @@ call plug#end() " vim-signify set updatetime=100 - + " vimtex let g:tex_flavor='latex' let g:vimtex_view_method=$READER - let g:vimtex_quickfix_mode=0 + let g:vimtex_quickfix_mode=0 " tex-conceal set conceallevel=2 @@ -89,16 +127,19 @@ call plug#end() let g:NERDTreeShowHidden=1 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + " SympylFold + let g:SympylFold_docstring_preview=1 + ""---Keybindings---"" " Reload vim nmap <F5> :source ~/.config/nvim/init.vim<CR> - + " Toggle relative line number nmap <F2> :set number invrelativenumber<CR> - + " Toggle NERDTree nmap <C-n> :NERDTreeToggle<CR> - + " Toggle Goyo nmap <F8> :Goyo<CR> @@ -110,3 +151,23 @@ call plug#end() " Spell checking map <Leader>s :call ToggleSpellCheck()<CR> + + " List chars + map <Leader>c :call ToggleListChars()<CR> + + " Enable folding with the spacebar + nnoremap <Space> za + + " YouCompleteMe + let g:ycm_autoclose_preview_window_after_completion=1 + map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR> + + " 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 diff --git a/.local/bin/pys/xcolors.py b/.local/bin/pys/xcolors.py index c6ef9f3..7040bc9 100755 --- a/.local/bin/pys/xcolors.py +++ b/.local/bin/pys/xcolors.py @@ -1,11 +1,12 @@ #!/usr/bin/env python import os -HOME=os.environ['HOME'] + '/' -XCDIR=f'{HOME}.config/xcolors/' -CSLIST=os.listdir(XCDIR) -XRPATH=f'{HOME}.Xresources' -ALPATH=f'{HOME}.config/alacritty/alacritty.yml' +HOME = os.environ['HOME'] + '/' +XCDIR = f'{HOME}.config/xcolors/' +CSLIST = os.listdir(XCDIR) +XRPATH = f'{HOME}.Xresources' +ALPATH = f'{HOME}.config/alacritty/alacritty.yml' +file_dir = f'{HOME}/test' def update_xresources(csname): @@ -56,5 +57,5 @@ def update_alacritty(csname): outfile.write(line) -if __name__=="__main__": +if __name__ == "__main__": print('Test') |