From 47cd585b61e5dc99caf71377eab5b316097e731a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 3 Dec 2018 13:52:45 -0500 Subject: [PATCH] vimrc video push --- .vimrc | 73 +++++++++++++++++----------------------------------------- 1 file changed, 21 insertions(+), 52 deletions(-) diff --git a/.vimrc b/.vimrc index 2eb76d2..08650a3 100644 --- a/.vimrc +++ b/.vimrc @@ -12,7 +12,6 @@ Plug 'PotatoesMaster/i3-vim-syntax' Plug 'jreybert/vimagit' Plug 'LukeSmithxyz/vimling' Plug 'vimwiki/vimwiki' -Plug 'dylanaraps/wal.vim' Plug 'terryma/vim-multiple-cursors' call plug#end() @@ -21,12 +20,20 @@ call plug#end() filetype plugin on syntax on set encoding=utf-8 - set number - set relativenumber + set number relativenumber +" Enable autocompletion: + set wildmode=longest,list,full +" Disables automatic commenting on newline: + autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Goyo plugin makes text more readable when writing prose: + map f :Goyo \| set linebreak + +" Spell-check set to o, 'o' for 'orthography': + map o :setlocal spell! spelllang=en_us " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. - set splitbelow - set splitright + set splitbelow splitright " Shortcutting split navigation, saving a keypress: map h @@ -37,9 +44,6 @@ call plug#end() " Check file in shellcheck: map s :!clear && shellcheck % -" View an image for a suckless sent presentation: - map v $F@ly$:!feh --scale-down --auto-zoom --image-bg black " & - " Open my bibliography file in split map b :vsp$BIB map r :vsp$REFER @@ -47,38 +51,25 @@ call plug#end() " Replace all is aliased to S. nnoremap S :%s//g -" Open corresponding .pdf/.html or preview - map p :!opout % - " Compile document, be it groff/LaTeX/markdown/etc. map c :w! \| !compiler % -"For saving view folds: - "au BufWinLeave * mkview - "au BufWinEnter * silent loadview +" Open corresponding .pdf/.html or preview + map p :!opout % -" Interpret .md files, etc. as .markdown +" Runs a script that cleans out tex build files whenever I close out of a .tex file. + autocmd VimLeave *.tex !texclear % + +" Ensure files are read as what I want: let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} - -" Make calcurse notes markdown compatible: autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown - -" groff files automatically detected autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff - -" .tex files automatically detected autocmd BufRead,BufNewFile *.tex set filetype=tex " Readmes autowrap text: autocmd BufRead,BufNewFile *.md set tw=79 -" Get line, word and character counts with w: - map w :!wc % - -" Spell-check set to o, 'o' for 'orthography': - map o :setlocal spell! spelllang=en_us - -" Use urlview to choose and open a url: +" Use urlscan to choose and open a url: :noremap u :wsilent !urlscan :noremap ,, :wsilent !urlscan @@ -86,20 +77,13 @@ call plug#end() vnoremap "*Y :let @+=@* map "+P -" Goyo plugin makes text more readable when writing prose: - map f :Goyo \| set linebreak - " Enable Goyo by default for mutt writting " Goyo's width will be the line limit in mutt. autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80 autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo -" Enable autocompletion: - set wildmode=longest,list,full - set wildmenu - -" Automatically deletes all tralling whitespace on save. - "autocmd BufWritePre * %s/\s\+$//e +" Automatically deletes all trailing whitespace on save. + autocmd BufWritePre * %s/\s\+$//e " When shortcut files are updated, renew bash and ranger configs with new material: autocmd BufWritePost ~/.bm* !shortcuts @@ -107,12 +91,6 @@ call plug#end() " Run xrdb whenever Xdefaults or Xresources are updated. autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb % -" Runs a script that cleans out tex build files whenever I close out of a .tex file. - autocmd VimLeave *.tex !texclear % - -" Disables automatic commenting on newline: - autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o - " Navigating with guides inoremap /<++>"_c4l vnoremap /<++>"_c4l @@ -238,12 +216,3 @@ call plug#end() autocmd FileType xml inoremap ,e <++>isPermaLink="false"><++>:put=strftime('%a, %d %b %Y %H:%M:%S %z')kJA<++>]]>?<enter>cit autocmd FileType xml inoremap ,a <a href="<++>"><++></a><++><Esc>F"ci" -vmap <expr> ++ VMATH_YankAndAnalyse() -nmap ++ vip++ - -vnoremap K xkP`[V`] -vnoremap J xp`[V`] -vnoremap L >gv -vnoremap H <gv - -map <enter><enter> yi[:e <c-r>"<cr>