minor changes to vim/vi and usage
This commit is contained in:
parent
648b4ae031
commit
484deb5def
@ -1,21 +1,24 @@
|
||||
let mapleader =" "
|
||||
|
||||
if ! filereadable(system('echo -n ".vim/autoload/plug.vim"'))
|
||||
if ! filereadable(system('echo -n "$HOME/.vim/autoload/plug.vim"'))
|
||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||
silent !mkdir -p .vim/autoload/
|
||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > .vim/autoload/plug.vim
|
||||
silent !mkdir -p "$HOME/.vim/autoload/"
|
||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > "$HOME/.vim/autoload/plug.vim"
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
|
||||
call plug#begin(system('echo -n ".vim/plugged"'))
|
||||
call plug#begin(system('echo -n "$HOME/.vim/plugged"'))
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'preservim/nerdtree'
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'jreybert/vimagit'
|
||||
Plug 'vimwiki/vimwiki'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'jreybert/vimagit'
|
||||
call plug#end()
|
||||
|
||||
set title
|
||||
@ -72,9 +75,17 @@ set noshowcmd
|
||||
" Compile document, be it groff/LaTeX/markdown/etc.
|
||||
map <leader>c :w! \| !compiler "<c-r>%"<CR>
|
||||
|
||||
" Cycle buffers a bit easier
|
||||
map L :bnext<CR>
|
||||
map H :bprevious<CR>
|
||||
|
||||
" Open corresponding .pdf/.html or preview
|
||||
map <leader>p :!opout <c-r>%<CR><CR>
|
||||
|
||||
" Easy save
|
||||
nnoremap <c-s> :w!<CR>
|
||||
inoremap <c-s> <ESC>:w!<CR>a
|
||||
|
||||
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
|
||||
autocmd VimLeave *.tex !texclear %
|
||||
|
||||
@ -125,3 +136,9 @@ function! ToggleHiddenAll()
|
||||
endif
|
||||
endfunction
|
||||
nnoremap <leader>h :call ToggleHiddenAll()<CR>
|
||||
|
||||
" Extra plugins configuration
|
||||
|
||||
" Airline
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline_theme='base16_gruvbox_dark_hard'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cmd=$(command -v "$1")
|
||||
test -n "$cmd" && exec vi "$cmd"
|
||||
test -n "$cmd" && exec vim "$cmd" || exec vi "$cmd"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user