This commit is contained in:
tavo-wasd 2024-03-07 05:21:17 -06:00
parent 497b4411f8
commit 804b2a3906
3 changed files with 20 additions and 2857 deletions

1
vim/.gitignore vendored
View file

@ -1,2 +1,3 @@
.netrwhist .netrwhist
autoload/
viminfo viminfo

File diff suppressed because it is too large Load diff

View file

@ -9,7 +9,7 @@ set viminfo+=n~/.config/vim/viminfo
set viewdir=~/.config/vim/view/ set viewdir=~/.config/vim/view/
set undodir=~/.config/vim/undo//,. set undodir=~/.config/vim/undo//,.
" Basic preferences " Preferences
set clipboard=unnamedplus set clipboard=unnamedplus
set shellcmdflag=-c set shellcmdflag=-c
set encoding=utf-8 set encoding=utf-8
@ -32,7 +32,6 @@ set showcmd
set number set number
syntax on syntax on
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal') if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
if (has("nvim")) if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1 let $NVIM_TUI_ENABLE_TRUE_COLOR=1
@ -42,7 +41,7 @@ if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
endif endif
endif endif
" Global keybindings " Keybinds
noremap <F5> :setlocal spell! spelllang=en<CR> noremap <F5> :setlocal spell! spelllang=en<CR>
noremap <F6> :setlocal spell! spelllang=es<CR> noremap <F6> :setlocal spell! spelllang=es<CR>
noremap <C-e> !!$SHELL<CR> noremap <C-e> !!$SHELL<CR>
@ -50,37 +49,24 @@ noremap <tab> :bn<CR>
noremap <C-c> :bd<CR> noremap <C-c> :bd<CR>
noremap <C-s> :w<CR> noremap <C-s> :w<CR>
noremap <A-h> 5<C-w>< noremap <A-h> 5<C-w><
noremap <A-j> 5<C-w>-
noremap <A-k> 5<C-w>+
noremap <A-l> 5<C-w>> noremap <A-l> 5<C-w>>
noremap H :nohl<CR> noremap H :nohl<CR>
noremap <Space> za noremap <Space> za
noremap N /@@@<CR> noremap N /@@@<CR>
" calcurse
autocmd BufNewFile,BufRead /tmp/calcurse* set filetype=markdown
" groff " groff
autocmd FileType groff noremap <buffer> <silent> <F9> :!zathura --fork %:r.pdf<CR> & disown autocmd FileType groff noremap <buffer> <silent> <F9> :!zathura --fork %:r.pdf<CR> & disown
autocmd FileType groff noremap <buffer> <C-s> :w<CR> :!groffc %<CR><CR> autocmd FileType groff noremap <buffer> <C-s> :w<CR> :!groffc %<CR><CR>
au BufNewFile,BufRead *.ms set filetype=groff au BufNewFile,BufRead *.ms set filetype=groff
" LaTeX
autocmd FileType tex noremap <buffer> <F9> :w<CR> :!latex %<CR> :!pdflatex %<CR>
autocmd FileType bib noremap <buffer> <F9> :w<CR> :!bibtex %<CR>
" Python " Python
autocmd FileType python noremap <buffer> <F9> :w<CR> :!python %<CR> autocmd FileType python noremap <buffer> <F9> :!python %<CR>
" Folds " Functions
autocmd BufWinLeave bibliography zM | mkview
autocmd BufWinEnter bibliography silent loadview
autocmd BufWinLeave bookmarks zM | mkview
autocmd BufWinEnter bookmarks silent loadview
" Wiki "Open a shell on a vertical split
autocmd FileType vimwiki noremap <buffer> <C-s> :w<CR> :VimwikiAll2HTML<CR><CR>
autocmd FileType vimwiki noremap <buffer> <silent> <F9> :!/bin/surf "file://$HOME/.local/share/vimwiki/html/index.html" &<CR><CR>
" Open a shell on a vertical split
set splitright set splitright
function OpenTerminal() function OpenTerminal()
execute "normal \<C-l>" execute "normal \<C-l>"
@ -130,15 +116,12 @@ Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-commentary' Plug 'tpope/vim-commentary'
Plug 'Yggdroot/indentLine' Plug 'Yggdroot/indentLine'
Plug 'preservim/nerdtree' Plug 'preservim/nerdtree'
"Plug 'chrisbra/Colorizer'
Plug 'junegunn/goyo.vim'
Plug 'mhinz/vim-signify' Plug 'mhinz/vim-signify'
Plug 'ibhagwan/fzf-lua' Plug 'ibhagwan/fzf-lua'
Plug 'morhetz/gruvbox' Plug 'morhetz/gruvbox'
call plug#end() call plug#end()
" Theme " Gruvbox
let g:gruvbox_contrast_hard=1
let g:gruvbox_contrast_dark='hard' let g:gruvbox_contrast_dark='hard'
let g:gruvbox_italic=1 let g:gruvbox_italic=1
set background=dark set background=dark
@ -150,8 +133,9 @@ set completeopt=menuone,longest
set complete+=kspell set complete+=kspell
" Airline " Airline
let g:airline#extensions#tabline#buffer_min_count = 2 let g:airline#extensions#tabline#buffer_min_count = 1
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
set ttimeout ttimeoutlen=0 set ttimeout ttimeoutlen=0
set laststatus=2 set laststatus=2
set noshowmode set noshowmode
@ -159,10 +143,6 @@ set noshowmode
" NERDTree " NERDTree
nnoremap <C-f> :NERDTreeToggle<CR> nnoremap <C-f> :NERDTreeToggle<CR>
" Goyo
map gy :Goyo<CR>
autocmd! User GoyoLeave highlight Normal ctermbg=NONE
" IndentLine " IndentLine
let g:indentLine_enabled = 1 let g:indentLine_enabled = 1
let g:indentLine_char = '▏' let g:indentLine_char = '▏'
@ -181,15 +161,9 @@ let g:signify_disable_by_default = 1
highlight SignColumn ctermbg=NONE highlight SignColumn ctermbg=NONE
noremap gd :SignifyToggle<CR> noremap gd :SignifyToggle<CR>
" Vimwiki
let g:vimwiki_list = [{'path': '~/Documents/', 'path_html': '~/.local/share/vimwiki/html/'}]
" Instant Markdown " Instant Markdown
let g:instant_markdown_autostart = 0 let g:instant_markdown_autostart = 0
autocmd FileType markdown noremap <buffer> <silent> <F9> :InstantMarkdownPreview<CR> autocmd FileType markdown noremap <buffer> <silent> <F9> :InstantMarkdownPreview<CR>
let g:instant_markdown_browser = "firefox --new-window" let g:instant_markdown_browser = "firefox --new-window"
let g:instant_markdown_mathjax = 1 let g:instant_markdown_mathjax = 1
let g:instant_markdown_mermaid = 1 let g:instant_markdown_mermaid = 1
" Colorizer (VIM)
"let g:colorizer_auto_color = 1