xD
This commit is contained in:
parent
497b4411f8
commit
804b2a3906
3 changed files with 20 additions and 2857 deletions
1
vim/.gitignore
vendored
1
vim/.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.netrwhist
|
||||
autoload/
|
||||
viminfo
|
||||
|
|
File diff suppressed because it is too large
Load diff
64
vim/vimrc
64
vim/vimrc
|
@ -9,7 +9,7 @@ set viminfo+=n~/.config/vim/viminfo
|
|||
set viewdir=~/.config/vim/view/
|
||||
set undodir=~/.config/vim/undo//,.
|
||||
|
||||
" Basic preferences
|
||||
" Preferences
|
||||
set clipboard=unnamedplus
|
||||
set shellcmdflag=-c
|
||||
set encoding=utf-8
|
||||
|
@ -32,17 +32,16 @@ set showcmd
|
|||
set number
|
||||
syntax on
|
||||
|
||||
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
|
||||
if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
|
||||
if (has("nvim"))
|
||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
endif
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
endif
|
||||
if (has("nvim"))
|
||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
endif
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
endif
|
||||
endif
|
||||
|
||||
" Global keybindings
|
||||
" Keybinds
|
||||
noremap <F5> :setlocal spell! spelllang=en<CR>
|
||||
noremap <F6> :setlocal spell! spelllang=es<CR>
|
||||
noremap <C-e> !!$SHELL<CR>
|
||||
|
@ -50,37 +49,24 @@ noremap <tab> :bn<CR>
|
|||
noremap <C-c> :bd<CR>
|
||||
noremap <C-s> :w<CR>
|
||||
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 H :nohl<CR>
|
||||
noremap <Space> za
|
||||
noremap N /@@@<CR>
|
||||
|
||||
" calcurse
|
||||
autocmd BufNewFile,BufRead /tmp/calcurse* set filetype=markdown
|
||||
|
||||
" groff
|
||||
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>
|
||||
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
|
||||
autocmd FileType python noremap <buffer> <F9> :w<CR> :!python %<CR>
|
||||
autocmd FileType python noremap <buffer> <F9> :!python %<CR>
|
||||
|
||||
" Folds
|
||||
autocmd BufWinLeave bibliography zM | mkview
|
||||
autocmd BufWinEnter bibliography silent loadview
|
||||
autocmd BufWinLeave bookmarks zM | mkview
|
||||
autocmd BufWinEnter bookmarks silent loadview
|
||||
" Functions
|
||||
|
||||
" Wiki
|
||||
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
|
||||
"Open a shell on a vertical split
|
||||
set splitright
|
||||
function OpenTerminal()
|
||||
execute "normal \<C-l>"
|
||||
|
@ -115,9 +101,9 @@ command SourceVimrc :source ~/.config/vim/vimrc
|
|||
|
||||
" Plugins
|
||||
if empty(glob('~/.config/vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source '~/.config/vim/vimrc'
|
||||
silent !curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source '~/.config/vim/vimrc'
|
||||
endif
|
||||
|
||||
call plug#begin()
|
||||
|
@ -130,15 +116,12 @@ Plug 'jiangmiao/auto-pairs'
|
|||
Plug 'tpope/vim-commentary'
|
||||
Plug 'Yggdroot/indentLine'
|
||||
Plug 'preservim/nerdtree'
|
||||
"Plug 'chrisbra/Colorizer'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'ibhagwan/fzf-lua'
|
||||
Plug 'morhetz/gruvbox'
|
||||
call plug#end()
|
||||
|
||||
" Theme
|
||||
let g:gruvbox_contrast_hard=1
|
||||
" Gruvbox
|
||||
let g:gruvbox_contrast_dark='hard'
|
||||
let g:gruvbox_italic=1
|
||||
set background=dark
|
||||
|
@ -150,8 +133,9 @@ set completeopt=menuone,longest
|
|||
set complete+=kspell
|
||||
|
||||
" 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_powerline_fonts = 1
|
||||
set ttimeout ttimeoutlen=0
|
||||
set laststatus=2
|
||||
set noshowmode
|
||||
|
@ -159,10 +143,6 @@ set noshowmode
|
|||
" NERDTree
|
||||
nnoremap <C-f> :NERDTreeToggle<CR>
|
||||
|
||||
" Goyo
|
||||
map gy :Goyo<CR>
|
||||
autocmd! User GoyoLeave highlight Normal ctermbg=NONE
|
||||
|
||||
" IndentLine
|
||||
let g:indentLine_enabled = 1
|
||||
let g:indentLine_char = '▏'
|
||||
|
@ -181,15 +161,9 @@ let g:signify_disable_by_default = 1
|
|||
highlight SignColumn ctermbg=NONE
|
||||
noremap gd :SignifyToggle<CR>
|
||||
|
||||
" Vimwiki
|
||||
let g:vimwiki_list = [{'path': '~/Documents/', 'path_html': '~/.local/share/vimwiki/html/'}]
|
||||
|
||||
" Instant Markdown
|
||||
let g:instant_markdown_autostart = 0
|
||||
autocmd FileType markdown noremap <buffer> <silent> <F9> :InstantMarkdownPreview<CR>
|
||||
let g:instant_markdown_browser = "firefox --new-window"
|
||||
let g:instant_markdown_mathjax = 1
|
||||
let g:instant_markdown_mermaid = 1
|
||||
|
||||
" Colorizer (VIM)
|
||||
"let g:colorizer_auto_color = 1
|
||||
|
|
Loading…
Reference in a new issue