summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vim/dict.add2
-rw-r--r--.vim/dict.add.splbin1577 -> 1599 bytes
-rw-r--r--.vimrc141
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
--- a/.vim/dict.add.spl
+++ b/.vim/dict.add.spl
Binary files 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 ='<div class="cluster"> <span class="row-2"> </span> </div>'
" get rid of line breaks in paragraphs
let @p ='g/^./ .,/^$/-1 join'
+iab <expr> @d strftime("%Y-%m-%d")
+iab <expr> @w 'cheers Scott Gilbertson wired@scottgilbertson.net <https://www.wired.com/author/scott-gilbertson/>'
+let @w ='icheers Scott Gilbertson wired@scottgilbertson.net <https://www.wired.com/author/scott-gilbertson/>'
" }}}
" Convenience mappings {{{
"for rewrapping things when composing email
map <leader>q gq}
-"uppercase words
-nnoremap <leader>up :%s/\<./\u&/g<cr>
-"Lowercase words
-nnoremap <leader>down :%s/\<./\l&/g<cr>
-
"conver to emdash
nnoremap <leader>- :%s/ -- /—/g<cr>
+nnoremap <leader>it /\vit's\|its <cr>
-nnoremap <leader>t TlistToggle<cr>
-
-nnoremap <leader>cd :lcd %:p:h<cr>
+nmap <leader>i :%s/ //g
+nmap <leader>p :%s/\#\#\# /###/g
+imap jj <Esc>
+vmap <silent> <leader>r <esc>:'<,'>:w !espeak &> /dev/null <CR>
" sane spelling options
nnoremap <leader>sp :set spell! spelllang=en_us spell?<CR>
set spellfile=~/.vim/dict.add
map <silent> <C-U> ]s
map <silent> <C-I> z=
-"quicker way to get to the thesaurus:
-inoremap ;t <c-x><c-t>
-nnoremap ;m :%s/ $//<cr>
+
"Let's just leave the whole w out of it shall we.
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
@@ -149,10 +143,6 @@ inoremap <left> <nop>
inoremap <right> <nop>
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 <silent> # :call VisualSelection('b')<CR>
"yank a line, not a line and some more
nnoremap Y y$
-nnoremap <leader>it /\vit's\|its <cr>
+
" Fuck you, help key.
noremap <F1> :checktime<cr>
inoremap <F1> <esc>:checktime<cr>
@@ -174,9 +164,6 @@ nnoremap zh mzzt10<c-u>`z
" Easier linewise reselection of what you just pasted.
nnoremap <leader>V V`]
-" HTML tag closing
-inoremap <C-_> <space><bs><esc>:call InsertCloseTag()<cr>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 <leader><space> :noh<cr>
" Tab Completion -------------------------------------------------------------- {{{
set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*
+let g:minisnip_trigger = '<A-Tab>'
"}}}
-
-
-
-"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 <leader>nt :<C-U>Ranger<CR>
+
" 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 "<args>" $NOTES_DIR
-command! -nargs=1 Ngrep vimgrep "<args>" $NOTES_DIR/*.txt|:cw
-"noremap <leader>n :Ngrep
-noremap <leader>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 <Nop>
" }}}
" Plugins {{{
-"Ctrl P {{{
-"nnoremap <leader>r :CtrlPMRU<cr>
-"nnoremap <leader>m :CtrlPBuffer<cr>
-"nnoremap <leader>. :CtrlP<cr>
-"nnoremap <leader>w :CtrlP ~/writing/wired/<cr>
-"nnoremap <leader>a :CtrlP app/<cr>
-"nnoremap <leader>d :CtrlP $HOME/notes/<cr>
-"nnoremap <leader>l :CtrlP $HOME/writing/luxagraf/<cr>
-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 = ['<C-n>', '<Down>']
-let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
-let g:SuperTabDefaultCompletionType = '<C-n>'
-
-nnoremap <silent> <c-s> :NV<CR>
let g:markdown_fold_style = 'nested'
-nmap <leader>i :%s/ //g
-nmap <leader># :%s/### /###/g
-
-imap jj <Esc>
-vmap <silent> <leader>r <esc>:'<,'>:w !espeak &> /dev/null <CR>
-
-xnoremap "+y y:call system("wl-copy", @")<cr>
-nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
-" Capital Quick first letter of a word or a regain
-nmap <leader>t :set opfunc=dotvim#titlecase<CR>g@
-xmap <leader>t :<C-U>call dotvim#titlecase(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
-nmap <leader>T :set opfunc=dotvim#titlecase<Bar>exe 'norm! 'v:count1.'g@_'<CR>
-
-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 <leader>sudo :w !sudo tee > /dev/null %
-
" POSIX Commands
nmap cd :cd <C-R>=expand('%:h')<CR>
@@ -451,3 +360,7 @@ nnoremap <leader>k :bprevious<CR>
xnoremap "+y y:call system("wl-copy", @")<cr>
nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p
nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p
+
+
+
+