From 7955e5c2cee8a9856d4b24394533a4a160a82943 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 18 Feb 2021 16:57:58 -0500 Subject: vim: added some abbreviations to my vimrc, got rid of some plugins --- .vim/dict.add | 2 + .vim/dict.add.spl | Bin 1577 -> 1599 bytes .vimrc | 141 +++++++++++------------------------------------------- 3 files changed, 29 insertions(+), 114 deletions(-) diff --git a/.vim/dict.add b/.vim/dict.add index 3f43935..736fe18 100644 --- a/.vim/dict.add +++ b/.vim/dict.add @@ -106,3 +106,5 @@ McPhail Caraval lateen unsubscribe +Lenovo +terabyte diff --git a/.vim/dict.add.spl b/.vim/dict.add.spl index f8ffa62..45efa04 100644 Binary files a/.vim/dict.add.spl and b/.vim/dict.add.spl differ diff --git a/.vimrc b/.vimrc index 78e2a2d..175ba90 100644 --- a/.vimrc +++ b/.vimrc @@ -4,7 +4,7 @@ filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Bundle 'gmarik/Vundle.vim' -Bundle 'ervandew/supertab' +"Bundle 'ervandew/supertab' Bundle 'airblade/vim-gitgutter' Bundle 'scrooloose/syntastic' Bundle 'tpope/vim-fugitive' @@ -26,13 +26,10 @@ Bundle 'francoiscabrol/ranger.vim' Bundle 'junegunn/fzf' Bundle 'junegunn/fzf.vim' Bundle 'chengzeyi/fzf-preview.vim' -Bundle 'alok/notational-fzf-vim' -Bundle 'dhruvasagar/vim-dotoo' -"Bundle 'tpope/vim-speeddating' +Bundle 'ervandew/supertab' call vundle#end() filetype plugin indent on "}}} -" " Basic stuff {{{ set encoding=utf-8 set scrolloff=3 @@ -56,57 +53,54 @@ set backspace=indent,eol,start set path+=** set wildmenu let mapleader = "," +set clipboard=unnamedplus +set completeopt+=menuone +set completeopt+=noselect "save things when we turn our back autocmd BufLeave,FocusLost * silent! wall " save things all the time: - let g:auto_save = 1 let g:auto_save_in_insert_mode = 0 "}}} - " Abbreviations {{{ " easier markdown links: let @a ='Sr%a()h' let @s ='Sr%a(){: rel=nofollow}17h' + " email signature: let @c ='icheers Scott Gilbertson sng@luxagraf.net ' -let @w ='icheers Scott Gilbertson scott_gilbertson@condenast.com' - +let @w ='icheers Scott Gilbertson wired@scottgilbertson.net' let @t ='iThank you for your help. ' let @h ="iHello, my name is Scott Gilbertson and and I am a product writer with WIRED's Gear team. I am reaching out because we're working on an article about " -let @b ='tag=w050b-20' -let @n ='tag=wirednl-20' let @d ='
' " get rid of line breaks in paragraphs let @p ='g/^./ .,/^$/-1 join' +iab @d strftime("%Y-%m-%d") +iab @w 'cheers Scott Gilbertson wired@scottgilbertson.net ' +let @w ='icheers Scott Gilbertson wired@scottgilbertson.net ' " }}} " Convenience mappings {{{ "for rewrapping things when composing email map q gq} -"uppercase words -nnoremap up :%s/\<./\u&/g -"Lowercase words -nnoremap down :%s/\<./\l&/g - "conver to emdash nnoremap - :%s/ -- /—/g +nnoremap it /\vit's\|its -nnoremap t TlistToggle - -nnoremap cd :lcd %:p:h +nmap i :%s/ //g +nmap p :%s/\#\#\# /###/g +imap jj +vmap r :'<,'>:w !espeak &> /dev/null " sane spelling options nnoremap sp :set spell! spelllang=en_us spell? set spellfile=~/.vim/dict.add map ]s map z= -"quicker way to get to the thesaurus: -inoremap ;t -nnoremap ;m :%s/ $// + "Let's just leave the whole w out of it shall we. noremap h noremap j @@ -149,10 +143,6 @@ inoremap inoremap nnoremap j gj nnoremap k gk -" Make os x clipboard work -set clipboard=unnamedplus - - " Visual mode pressing * or # searches for the current selection " Super useful! From an idea by Michael Naumann @@ -161,7 +151,7 @@ vnoremap # :call VisualSelection('b') "yank a line, not a line and some more nnoremap Y y$ -nnoremap it /\vit's\|its + " Fuck you, help key. noremap :checktime inoremap :checktime @@ -174,9 +164,6 @@ nnoremap zh mzzt10`z " Easier linewise reselection of what you just pasted. nnoremap V V`] -" HTML tag closing -inoremap :call InsertCloseTag()a - " Select (charwise) the contents of the current line, excluding indentation. " Great for pasting Python lines into REPLs. nnoremap vv ^vg_ @@ -211,44 +198,16 @@ nnoremap :noh " Tab Completion -------------------------------------------------------------- {{{ set wildmode=list:longest,list:full set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/* +let g:minisnip_trigger = '' "}}} - - - -"Trying ranger -"function! RangeChooser() -" let temp = tempname() -" " The option "--choosefiles" was added in ranger 1.5.1. Use the next line -" " with ranger 1.4.2 through 1.5.0 instead. -" "exec 'silent !ranger --choosefile=' . shellescape(temp) -" if has("gui_running") -" exec 'silent !xterm -e ranger --choosefiles=' . shellescape(temp) -" else -" exec 'silent !ranger --choosefiles=' . shellescape(temp) -" endif -" if !filereadable(temp) -" redraw! -" " Nothing to read. -" return -" endif -" let names = readfile(temp) -" if empty(names) -" redraw! -" " Nothing to open. -" return -" endif -" " Edit the first item. -" exec 'edit ' . fnameescape(names[0]) -" " Add any remaning items to the arg list/buffer list. -" for name in names[1:] -" exec 'argadd ' . fnameescape(name) -" endfor -" redraw! -"endfunction -"command! -bar RangerChooser call RangeChooser() +"mucomplete +"let g:mucomplete#enable_auto_at_startup = 1 +"let g:mucomplete#completion_delay = 1 +"let g:mucomplete#cycle_with_trigger = 0 nnoremap nt :Ranger + " Backups ----------------------------------------------------------------------{{{ set backup " enable backups @@ -273,19 +232,8 @@ endif set backupskip=/tmp/*,/private/tmp/*" " }}} -"Thesaurus -set thesaurus+=/home/lxf/.mthesaur.txt -"}}} -" Notes (AKA NValt in Vim){{{ -" NValt style searching with Ack to quicklist -command! -nargs=1 Nvs :Ack -i -n "" $NOTES_DIR -command! -nargs=1 Ngrep vimgrep "" $NOTES_DIR/*.txt|:cw -"noremap n :Ngrep -noremap v :Nvs -" }}} " Filetype stuff {{{ " -autocmd! BufRead,BufNewFile *.org setlocal filetype=dotoo augroup ft_vim au! au FileType vim setlocal foldmethod=marker @@ -380,19 +328,6 @@ augroup END noremap zE " }}} " Plugins {{{ -"Ctrl P {{{ -"nnoremap r :CtrlPMRU -"nnoremap m :CtrlPBuffer -"nnoremap . :CtrlP -"nnoremap w :CtrlP ~/writing/wired/ -"nnoremap a :CtrlP app/ -"nnoremap d :CtrlP $HOME/notes/ -"nnoremap l :CtrlP $HOME/writing/luxagraf/ -let g:ctrlp_custom_ignore = { - \ 'dir': '\v[\/]\.(git|hg|svn|venv|site|static)$', - \ 'file': '\v\.(pyc|so|dll)$', - \ } -"}}} "FZF {{{ let g:fzf_preview_window='right:60%' let g:fzf_history_dir = '~/.local/share/fzf-history' @@ -413,34 +348,8 @@ let g:nv_search_paths = ['~/notes', '~/writing/luxagraf/', '~/documents/bookmark " SimpylFold Python folding plugin {{{ let g:SimpylFold_docstring_preview = 0 "}}} -" make YCM compatible with UltiSnips (using supertab) -let g:ycm_key_list_select_completion = ['', ''] -let g:ycm_key_list_previous_completion = ['', ''] -let g:SuperTabDefaultCompletionType = '' - -nnoremap :NV let g:markdown_fold_style = 'nested' -nmap i :%s/ //g -nmap # :%s/### /###/g - -imap jj -vmap r :'<,'>:w !espeak &> /dev/null - -xnoremap "+y y:call system("wl-copy", @") -nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '', '', 'g')p -" Capital Quick first letter of a word or a regain -nmap t :set opfunc=dotvim#titlecaseg@ -xmap t :call dotvim#titlecase(visualmode(),visualmode() ==# 'V' ? 1 : 0) -nmap T :set opfunc=dotvim#titlecaseexe 'norm! 'v:count1.'g@_' - -let g:dotoo#agenda#warning_days = '30d' -let g:dotoo#agenda#files = ['~/documents/org/*.org'] -let g:dotoo#capture#refile = expand('~/documents/org/refile.org') - -" Write To File As Sudo -nnoremap sudo :w !sudo tee > /dev/null % - " POSIX Commands nmap cd :cd =expand('%:h') @@ -451,3 +360,7 @@ nnoremap k :bprevious xnoremap "+y y:call system("wl-copy", @") nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '', '', 'g')p nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '', '', 'g')p + + + + -- cgit v1.2.3-70-g09d2