Created
August 5, 2019 14:08
-
-
Save mcsf/4ad716d6b6b08110550db74f7f761d0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader = " " | |
let maplocalleader = " " | |
filetype plugin on | |
" === Begin Plug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
call plug#begin() | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'tpope/vim-fugitive' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'junegunn/goyo.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-commentary' | |
Plug '~/.vim/own/prose-mode/' | |
Plug '~/.vim/own/eval-block/' | |
Plug 'tpope/vim-rhubarb' | |
Plug 'rhysd/devdocs.vim' | |
Plug 'w0rp/ale' | |
Plug 'tpope/vim-dispatch' | |
Plug 'janko-m/vim-test' | |
Plug 'mcsf/interact.vim' | |
Plug 'pangloss/vim-javascript' | |
Plug 'mxw/vim-jsx' | |
Plug 'tpope/vim-speeddating' | |
Plug 'jceb/vim-orgmode' | |
Plug 'dracula/vim' " Needs :hi Comment ctermfg=518 | |
Plug 'endel/vim-github-colorscheme' | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'haishanh/night-owl.vim' | |
" Plug 'fxn/vim-monochrome' | |
" Plug 'aradunovic/perun.vim' | |
" Plug 'logico-dev/typewriter' | |
" Plug 'TroyFletcher/vim-colors-synthwave' | |
" Plug 'vim-syntastic/syntastic' | |
" Plug 'tpope/vim-dispatch' | |
" Plug 'miconda/lucariox.vim' | |
call plug#end() | |
" === End Plug | |
autocmd filetype crontab setlocal nobackup nowritebackup | |
" Buffers | |
set hidden | |
set incsearch | |
set suffixesadd+=.js | |
map <C-p> :GFiles<cr> | |
map Ç :Buffers<cr> | |
map <S-Left> :hide bp<CR> | |
map <S-Right> :hide bn<CR> | |
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis | |
\ | wincmd p | diffthis | |
" Eval | |
nmap <F8> :w<cr>:make <Up> | |
nmap <F9> :call run#Run()<cr> | |
imap <F8> <Esc><F8> | |
imap <F9> <Esc><F9> | |
" EvalBlock (custom) | |
command! Rpn EvalBlock = !rpn | |
" FZF | |
" CTRL-A CTRL-Q to select all and build quickfix list | |
function! s:build_quickfix_list(lines) | |
call setqflist(map(copy(a:lines), '{ "filename": v:val }')) | |
copen | |
cc | |
endfunction | |
let g:fzf_action = { | |
\ 'ctrl-q': function('s:build_quickfix_list'), | |
\ 'ctrl-t': 'tab split', | |
\ 'ctrl-x': 'split', | |
\ 'ctrl-v': 'vsplit' } | |
let $FZF_DEFAULT_OPTS = '--bind ctrl-a:select-all' | |
" Mouse | |
set mouse=a | |
" Org | |
command! Todo edit ~/todo.org | |
let g:org_agenda_files=['~/todo.org'] | |
" Shorthand | |
imap jk <esc> | |
imap kj <esc> | |
cmap kj <C-u><Esc> | |
imap ii <C-o>: | |
map <LocalLeader>] <C-]> | |
"imap <space><space> <C-n> | |
command! Scratchpad new ~/scratchpad | |
" Tabs | |
set shiftwidth=0 | |
set tabstop=4 | |
"set softtabstop=4 | |
"set smarttab& | |
" Text | |
set backspace=indent,eol,start | |
set dictionary+=/usr/share/dict/words | |
set encoding=utf8 | |
set omnifunc=syntaxcomplete#Complete | |
set tags+=../tags | |
set thesaurus+=~/.vim/mthesaur.txt | |
map <Up> gk | |
map <Down> gj | |
nmap Q gwap | |
vmap Q gw | |
imap QQ <C-o>:normal Q<cr> | |
command! SpEnglish setlocal spl=en spell! | |
command! SpFrench setlocal spl=fr spell! | |
command! SpPortuguese setlocal spl=pt spell! | |
command! SpSuggest normal z= | |
command! SpNext normal ]s | |
" Terminal | |
function! Send_File() | |
let term = term_list()[0] | |
let src = substitute(join(getline(1,"$"), "\n"), "\t", " ", "g") | |
call term_sendkeys(term, "\n" . src . "\n") | |
endfunction | |
map <LocalLeader><C-r> :call Send_File()<cr> | |
" Visual | |
"set number | |
set laststatus=2 | |
set shortmess+=aI | |
set showcmd | |
set showmatch | |
" let g:ale_set_highlights = 0 | |
command! SpellFixHighlight highlight clear SpellBad|highlight clear SpellCap|highlight link SpellBad ErrorMsg|highlight link SpellCap WarningMsg|highlight link ALEErrorSign ErrorMsg|highlight link ALESignColumnWithErrors ErrorMsg | |
command! Day set background=light|colorscheme solarized|SpellFixHighlight | |
command! Night set background=dark|colorscheme dracula|SpellFixHighlight | |
command! Dusk set background=light|colorscheme default|set background=light|SpellFixHighlight | |
function! IsDarkMode() | |
return system("defaults read \"Apple Global Domain\" AppleInterfaceStyle") == "Dark\n" | |
endfunction | |
if IsDarkMode() | |
Night | |
else | |
if $ITERM_PROFILE == "Terminal" | |
Day | |
endif | |
endif | |
match Error / / | |
" Wilderness | |
set wildmenu | |
set wildmode=list:longest "longest,full | |
set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png,*.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment