Compare commits
3 Commits
0139026e84
...
cb93ce1708
Author | SHA1 | Date | |
---|---|---|---|
cb93ce1708 | |||
aac342011d | |||
5f0f3bba37 |
@ -10,3 +10,27 @@
|
|||||||
insteadOf = https://github.com/
|
insteadOf = https://github.com/
|
||||||
[alias]
|
[alias]
|
||||||
gr = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
gr = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
||||||
|
# one-line log
|
||||||
|
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
|
||||||
|
|
||||||
|
a = add
|
||||||
|
ap = add -p
|
||||||
|
c = commit --verbose
|
||||||
|
ca = commit -a --verbose
|
||||||
|
cm = commit -m
|
||||||
|
cam = commit -a -m
|
||||||
|
m = commit --amend --verbose
|
||||||
|
|
||||||
|
d = diff
|
||||||
|
ds = diff --stat
|
||||||
|
dc = diff --cached
|
||||||
|
|
||||||
|
s = status -s
|
||||||
|
st = status -s
|
||||||
|
co = checkout
|
||||||
|
cob = checkout -b
|
||||||
|
# list branches sorted by last modified
|
||||||
|
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
|
||||||
|
|
||||||
|
# list aliases
|
||||||
|
la = "!git config -l | grep alias | cut -c 7-"
|
||||||
|
76
vim/.vim/prefs/airline.vim
Normal file
76
vim/.vim/prefs/airline.vim
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
" AirLine visual settings
|
||||||
|
if !exists('g:airline_symbols')
|
||||||
|
let g:airline_symbols = {}
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:airline_theme='onedark'
|
||||||
|
" let g:airline_stl_path_style = 'short'
|
||||||
|
|
||||||
|
let g:airline#extensions#coc#enabled = 1
|
||||||
|
|
||||||
|
let g:airline_left_sep=''
|
||||||
|
let g:airline_left_alt_sep = ''
|
||||||
|
let g:airline_right_sep=''
|
||||||
|
let g:airline_right_alt_sep = ''
|
||||||
|
let g:airline_symbols.branch = ''
|
||||||
|
let g:airline_symbols.readonly = ''
|
||||||
|
let g:airline_symbols.dirty = ''
|
||||||
|
let g:airline_symbols.linenr = ''
|
||||||
|
"let g:airline_symbols.whitespace = 'Ξ'
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
|
||||||
|
let g:airline#extensions#tabline#show_buffers = 0
|
||||||
|
let g:airline#extensions#tabline#show_splits = 1
|
||||||
|
let g:airline#extensions#tabline#show_tabs = 1
|
||||||
|
let g:airline#extensions#tabline#show_tab_nr = 0
|
||||||
|
let g:airline#extensions#tabline#show_tab_type = 0
|
||||||
|
let g:airline#extensions#tabline#exclude_preview = 1
|
||||||
|
let g:airline#extensions#tabline#show_close_button = 0
|
||||||
|
let g:airline#extensions#tabline#fnamemod = ':t'
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
function getCitc()
|
||||||
|
local fname = vim.api.nvim_buf_get_name(0)
|
||||||
|
if string.find(fname, '/google/src/cloud/', 1, true) then
|
||||||
|
local parts = split(fname, '/')
|
||||||
|
return parts[5]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
" let g:airline_section_c = execute("lua getCitc()")
|
||||||
|
let g:airline_mode_map = {
|
||||||
|
\ '__' : '------',
|
||||||
|
\ 'n' : 'NORMAL',
|
||||||
|
\ 'c' : 'COMMAND',
|
||||||
|
\ 'i' : 'INSERT',
|
||||||
|
\ 'R' : 'REPLACE',
|
||||||
|
\ 's' : 'SELECT',
|
||||||
|
\ 'S' : 'S-LINE',
|
||||||
|
\ '' : 'S-BLOCK',
|
||||||
|
\ 'v' : 'VISUAL',
|
||||||
|
\ 'V' : 'V-LINE',
|
||||||
|
\ '' : 'V-BLOCK',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
let g:PaperColor_Theme_Options = {
|
||||||
|
\ 'language': {
|
||||||
|
\ 'python': {
|
||||||
|
\ 'highlight_builtins' : 1
|
||||||
|
\ },
|
||||||
|
\ 'cpp': {
|
||||||
|
\ 'highlight_standard_library': 1
|
||||||
|
\ },
|
||||||
|
\ 'c': {
|
||||||
|
\ 'highlight_builtins' : 1
|
||||||
|
\ }
|
||||||
|
\ },
|
||||||
|
\ 'theme': {
|
||||||
|
\ 'default.dark': {
|
||||||
|
\ 'transparent_background': 1
|
||||||
|
\ }
|
||||||
|
\ }
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|
42
vim/.vim/prefs/ctrlp.vim
Normal file
42
vim/.vim/prefs/ctrlp.vim
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
" -------- CTRL-P --------
|
||||||
|
let g:ctrlp_map = '<c-o>'
|
||||||
|
let g:ctrlp_show_hidden = 1
|
||||||
|
let g:ctrlp_working_path_mode = 'ra'
|
||||||
|
set wildignore+=*/tmp/*,*.so,*.swo,*.swp,*.zip,*.o,*.d " MacOSX/Linux
|
||||||
|
"let g:ctrlp_custom_ignore = '\v[\/](vendor|node_modules|target|dist|build)|(\.(swp|ico|git|svn))$'
|
||||||
|
let g:ctrlp_custom_ignore = {
|
||||||
|
\ 'dir': 'vendor\|node_modules\|target\|dist\|build\|mntdeps',
|
||||||
|
\'file': '\v\.(swp|ico|git|svn|exe)'
|
||||||
|
\ }
|
||||||
|
"let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||||
|
let g:ctrlp_extensions = ['smarttabs']
|
||||||
|
let g:ctrlp_switch_buffer = 'ETVH'
|
||||||
|
let g:ctrlp_open_new_file = 't'
|
||||||
|
|
||||||
|
" Let CtrlP not go all the way up to the root of the client. Instead, consider a
|
||||||
|
" METADATA file to delimit a project.
|
||||||
|
let g:ctrlp_root_markers = ['METADATA']
|
||||||
|
|
||||||
|
" CtrlP auto cache clearing.
|
||||||
|
function! SetupCtrlP()
|
||||||
|
if exists("g:loaded_ctrlp") && g:loaded_ctrlp
|
||||||
|
augroup CtrlPExtension
|
||||||
|
autocmd!
|
||||||
|
autocmd FocusGained * CtrlPClearCache
|
||||||
|
autocmd BufWritePost * CtrlPClearCache
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
if has("autocmd")
|
||||||
|
autocmd VimEnter * :call SetupCtrlP()
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Ripgrep (rg) is a super fast search utility
|
||||||
|
" Use rg for ctrl-p plugin
|
||||||
|
if executable('rg')
|
||||||
|
set grepprg=rg\ --hidden\ --color=never
|
||||||
|
let g:ctrlp_use_caching = 0
|
||||||
|
let g:ctrlp_user_command = 'rg --files --hidden --color=never * %s'
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
22
vim/.vim/prefs/devicons.vim
Normal file
22
vim/.vim/prefs/devicons.vim
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
let s:brown = "964B00"
|
||||||
|
let s:aqua = "3AFFDB"
|
||||||
|
let s:blue = "689FB6"
|
||||||
|
let s:darkBlue = "44788E"
|
||||||
|
let s:purple = "834F79"
|
||||||
|
let s:lightPurple = "834F79"
|
||||||
|
let s:red = "AE403F"
|
||||||
|
let s:beige = "F5C06F"
|
||||||
|
let s:yellow = "F09F17"
|
||||||
|
let s:orange = "D4843E"
|
||||||
|
let s:darkOrange = "F16529"
|
||||||
|
let s:pink = "CB6F6F"
|
||||||
|
let s:salmon = "EE6E73"
|
||||||
|
let s:green = "8FAA54"
|
||||||
|
let s:lightGreen = "31B53E"
|
||||||
|
let s:white = "FFFFFF"
|
||||||
|
let s:rspec_red = 'FE405F'
|
||||||
|
let s:git_orange = 'F54D27'
|
||||||
|
|
||||||
|
" If you have vim-devicons you can customize your icons for each file type.
|
||||||
|
let g:NERDTreeExtensionHighlightColor = {} "this line is needed to avoid error
|
||||||
|
let g:NERDTreeExtensionHighlightColor['java'] = s:lightGreen "assigning it to an empty string will skip highlight
|
30
vim/.vim/prefs/fzf.vim
Normal file
30
vim/.vim/prefs/fzf.vim
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
"nnoremap <silent> <C-p> :FZF -m<cr>
|
||||||
|
"let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
||||||
|
|
||||||
|
" nmap <C-P> :FZF<CR>
|
||||||
|
|
||||||
|
nmap <leader><tab> <plug>(fzf-maps-n)
|
||||||
|
xmap <leader><tab> <plug>(fzf-maps-x)
|
||||||
|
omap <leader><tab> <plug>(fzf-maps-o)
|
||||||
|
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
||||||
|
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
||||||
|
let g:fzf_command_prefix = 'Fzf'
|
||||||
|
" use the same keybindings for fzf as in shell
|
||||||
|
" nnoremap <silent> <c-s-t> :FzfHgFiles<CR>
|
||||||
|
" nnoremap <silent> <c-s-f> :FzfHgRg<space>
|
||||||
|
let s:hg_command = 'hg files 2>/dev/null'
|
||||||
|
|
||||||
|
command! -bang FzfHgFiles
|
||||||
|
\ call fzf#run(fzf#wrap({
|
||||||
|
\ 'source': s:hg_command,
|
||||||
|
\ 'options': $FZF_DEFAULT_OPTS . " " . $FZF_CTRL_T_OPTS,
|
||||||
|
\ }),
|
||||||
|
\ <bang>0
|
||||||
|
\ )
|
||||||
|
command! -bang -nargs=* FzfHgRg
|
||||||
|
\ call fzf#vim#grep(
|
||||||
|
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
|
||||||
|
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||||
|
\ : fzf#vim#with_preview('right:50%'),
|
||||||
|
\ <bang>0)
|
||||||
|
|
@ -4,9 +4,13 @@ set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/
|
|||||||
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch
|
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch
|
||||||
|
|
||||||
Glug! glaive
|
Glug! glaive
|
||||||
Glaive imp plugin[mappings] Suggest[default]=buffer,csearch,prompt,primp Report[default]=popupnotify
|
" Glaive imp Suggest[default]=buffer,primp,csearch,prompt Report[default]=popupnotify
|
||||||
|
" Glaive imp Suggest[default]=buffer,csearch,prompt,primp Report[default]=popupnotify
|
||||||
|
" Glaive imp Pick[default]=inputlist Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
||||||
|
Glaive imp Pick[default]=fzf Suggest[default]=buffer,primp,csearch,prompt Report[default]=echo
|
||||||
"
|
"
|
||||||
" nnoremap <leader>csi :CsImporter<cr>
|
" nnoremap <leader>csi :CsImporter<cr>
|
||||||
nnoremap <leader>csi :ImpSuggest
|
nnoremap <leader>csi :ImpSuggest <C-r><C-w><cr>
|
||||||
" nnoremap <leader>ii :ImpSuggest
|
nnoremap <leader>ii :ImpSuggest <C-r><C-w><cr>
|
||||||
" nnoremap <leader>if :ImpFirst
|
nnoremap <leader>if :ImpFirst <C-r><C-w><cr>
|
||||||
|
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
" mnemonic: (i)nsert (l)ambda
|
|
||||||
imap <leader>il <C-K>l*
|
|
||||||
|
|
||||||
" HEX<->ASCII
|
|
||||||
" mnemonic: (h)ex (t)o (a)scii
|
|
||||||
vnoremap <leader>hta :<c-u>s/\%V\x\x/\=nr2char(printf("%d", "0x".submatch(0)))/g<cr><c-l>`<
|
|
||||||
" mnemonic: (a)scii (t)o (h)ex
|
|
||||||
vnoremap <leader>ath :<c-u>s/\%V./\=printf("%x",char2nr(submatch(0)))/g<cr><c-l>`<
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let g:windowswap_map_keys = 0 "prevent default bindings
|
let g:windowswap_map_keys = 0 "prevent default bindings
|
||||||
nnoremap <silent> <leader>yw :call WindowSwap#MarkWindowSwap()<CR>
|
nnoremap <silent> <leader>yw :call WindowSwap#MarkWindowSwap()<CR>
|
||||||
|
|
||||||
|
|
||||||
" --------- SURROUND MAPPINGS ---------
|
" --------- SURROUND MAPPINGS ---------
|
||||||
" <leader>" Surround a word with "quotes"
|
" <leader>" Surround a word with "quotes"
|
||||||
map <leader>" ysiw"
|
map <leader>" ysiw"
|
||||||
@ -86,20 +74,6 @@ endfunction
|
|||||||
|
|
||||||
nmap <leader>toi :CocCommand tsserver.organizeImports<cr>
|
nmap <leader>toi :CocCommand tsserver.organizeImports<cr>
|
||||||
|
|
||||||
|
|
||||||
" --------- FUGITIVE MAPPINGS ---------
|
|
||||||
nmap <leader>dg :diffget<cr>
|
|
||||||
nmap <leader>dp :diffput<cr>
|
|
||||||
nmap <leader>du :diffupdate<cr>
|
|
||||||
vmap <leader>dg :diffget<cr>
|
|
||||||
vmap <leader>dp :diffput<cr>
|
|
||||||
vmap <leader>du :diffupdate<cr>
|
|
||||||
|
|
||||||
nmap <leader>giw :Gwrite<cr>
|
|
||||||
nmap <leader>gic :Gcommit -v<cr>
|
|
||||||
nmap <leader>gid :Gdiff<cr>
|
|
||||||
nmap <leader>gis :Gstatus<cr>
|
|
||||||
|
|
||||||
"" --------- NERD Commenter
|
"" --------- NERD Commenter
|
||||||
" Create default mappings
|
" Create default mappings
|
||||||
let g:NERDCreateDefaultMappings = 0
|
let g:NERDCreateDefaultMappings = 0
|
||||||
|
@ -12,7 +12,6 @@ map <Esc>[D <Left>
|
|||||||
" remove mapping to be used in nerdtree
|
" remove mapping to be used in nerdtree
|
||||||
inoremap <Nul> <C-n>
|
inoremap <Nul> <C-n>
|
||||||
|
|
||||||
" Fox for Ack
|
|
||||||
cnoremap %% <C-R>=fnameescape(expand("%:p:h")."/")<CR>
|
cnoremap %% <C-R>=fnameescape(expand("%:p:h")."/")<CR>
|
||||||
|
|
||||||
" move vertically by visual line
|
" move vertically by visual line
|
||||||
@ -40,7 +39,7 @@ nnoremap <S-D> <C-D>
|
|||||||
nnoremap [e :<c-u>execute 'move -1-'. v:count1<cr>
|
nnoremap [e :<c-u>execute 'move -1-'. v:count1<cr>
|
||||||
nnoremap ]e :<c-u>execute 'move +'. v:count1<cr>
|
nnoremap ]e :<c-u>execute 'move +'. v:count1<cr>
|
||||||
|
|
||||||
" Create window splits easier. The default
|
" Create window splits easier
|
||||||
nnoremap <silent> vv <C-w>v
|
nnoremap <silent> vv <C-w>v
|
||||||
nnoremap <silent> ss <C-w>s
|
nnoremap <silent> ss <C-w>s
|
||||||
|
|
||||||
@ -49,7 +48,4 @@ nnoremap <C-t> <Cmd>CocCommand explorer<CR>
|
|||||||
" always use very magic mode when searching
|
" always use very magic mode when searching
|
||||||
"nnoremap / /\v
|
"nnoremap / /\v
|
||||||
"vnoremap / /\v
|
"vnoremap / /\v
|
||||||
"
|
nnoremap <silent> <leader>ww :call WindowSwap#EasyWindowSwap()<CR>
|
||||||
vnoremap // y/\V<C-r>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
nmap <F1> :CocCommand java.debug.vimspector.start<CR>
|
|
||||||
|
@ -1,186 +1,7 @@
|
|||||||
let pyxversion = 3
|
" ONE LINERS ONLY
|
||||||
|
|
||||||
|
|
||||||
" -------- FZF --------
|
|
||||||
" nmap <C-P> :FZF<CR>
|
|
||||||
|
|
||||||
nmap <leader><tab> <plug>(fzf-maps-n)
|
|
||||||
xmap <leader><tab> <plug>(fzf-maps-x)
|
|
||||||
omap <leader><tab> <plug>(fzf-maps-o)
|
|
||||||
let g:fzf_preview_window = ['right:50%', 'ctrl-/']
|
|
||||||
|
|
||||||
let g:fzf_command_prefix = 'Fzf'
|
|
||||||
let s:hg_command = 'hg whatsout --template= -- '
|
|
||||||
|
|
||||||
" command! -bang -nargs=* HgFiles
|
|
||||||
" \ call fzf#vim#grep(
|
|
||||||
" \ 'git grep --line-number -- '.shellescape(<q-args>), 0,
|
|
||||||
" \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
|
|
||||||
|
|
||||||
command! -bang FzfHgFiles
|
|
||||||
\ call fzf#run(fzf#wrap({
|
|
||||||
\ 'source': s:hg_command,
|
|
||||||
\ }),
|
|
||||||
\ <bang>0
|
|
||||||
\ )
|
|
||||||
command! -bang -nargs=* FzfHgRg
|
|
||||||
\ call fzf#vim#grep(
|
|
||||||
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
|
|
||||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
|
||||||
\ : fzf#vim#with_preview('right:50%'),
|
|
||||||
\ <bang>0)
|
|
||||||
|
|
||||||
"
|
|
||||||
"
|
|
||||||
" -------- CTRL-P --------
|
|
||||||
" let g:ctrlp_map = '<c-o>'
|
|
||||||
" let g:ctrlp_show_hidden = 1
|
|
||||||
" let g:ctrlp_working_path_mode = 'ra'
|
|
||||||
" set wildignore+=*/tmp/*,*.so,*.swo,*.swp,*.zip,*.o,*.d " MacOSX/Linux
|
|
||||||
" "let g:ctrlp_custom_ignore = '\v[\/](vendor|node_modules|target|dist|build)|(\.(swp|ico|git|svn))$'
|
|
||||||
" let g:ctrlp_custom_ignore = {
|
|
||||||
" \ 'dir': 'vendor\|node_modules\|target\|dist\|build\|mntdeps',
|
|
||||||
" \'file': '\v\.(swp|ico|git|svn|exe)'
|
|
||||||
" \ }
|
|
||||||
" "let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
|
||||||
" let g:ctrlp_extensions = ['smarttabs']
|
|
||||||
" let g:ctrlp_switch_buffer = 'ETVH'
|
|
||||||
" let g:ctrlp_open_new_file = 't'
|
|
||||||
"
|
|
||||||
" " Let CtrlP not go all the way up to the root of the client. Instead, consider a
|
|
||||||
" " METADATA file to delimit a project.
|
|
||||||
" let g:ctrlp_root_markers = ['METADATA']
|
|
||||||
"
|
|
||||||
" " CtrlP auto cache clearing.
|
|
||||||
" function! SetupCtrlP()
|
|
||||||
" if exists("g:loaded_ctrlp") && g:loaded_ctrlp
|
|
||||||
" augroup CtrlPExtension
|
|
||||||
" autocmd!
|
|
||||||
" autocmd FocusGained * CtrlPClearCache
|
|
||||||
" autocmd BufWritePost * CtrlPClearCache
|
|
||||||
" augroup END
|
|
||||||
" endif
|
|
||||||
" endfunction
|
|
||||||
" if has("autocmd")
|
|
||||||
" autocmd VimEnter * :call SetupCtrlP()
|
|
||||||
" endif
|
|
||||||
"
|
|
||||||
" " Ripgrep (rg) is a super fast search utility
|
|
||||||
" " Use rg for ctrl-p plugin
|
|
||||||
" if executable('rg')
|
|
||||||
" set grepprg=rg\ --hidden\ --color=never
|
|
||||||
" let g:ctrlp_use_caching = 0
|
|
||||||
" let g:ctrlp_user_command = 'rg --files --hidden --color=never * %s'
|
|
||||||
" endif
|
|
||||||
|
|
||||||
|
|
||||||
" -------- VIM-MARKDOWN --------
|
|
||||||
let g:vim_markdown_folding_disabled = 1
|
|
||||||
|
|
||||||
|
|
||||||
" -------- LATEX --------
|
|
||||||
let g:windowswap_map_keys = 0 "prevent default bindings
|
|
||||||
nnoremap <silent> <leader>ww :call WindowSwap#EasyWindowSwap()<CR>
|
|
||||||
|
|
||||||
"Don't ask to save when changing buffers (i.e. when jumping to a type definition)
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
let g:UltiSnipsExpandTrigger = "<nop>"
|
|
||||||
inoremap <expr> <CR> pumvisible() ? "<C-R>=UltiSnips#ExpandSnippetOrJump()<CR>" : "\<CR>"
|
|
||||||
let g:vim_php_refactoring_use_default_mapping = 0
|
|
||||||
nnoremap <Leader>da :call PhpDocAll()<CR>
|
|
||||||
|
|
||||||
" If you want :UltiSnipsEdit to split your window.
|
|
||||||
let g:UltiSnipsEditSplit="vertical"
|
|
||||||
|
|
||||||
let g:php_html_in_heredoc = 0
|
|
||||||
let g:php_html_in_nowdoc = 0
|
|
||||||
let g:php_sql_query = 0
|
|
||||||
let g:php_sql_heredoc = 0
|
|
||||||
let g:php_sql_nowdoc = 0
|
|
||||||
|
|
||||||
let jshint2_read = 1
|
|
||||||
" set statusline+=%#warningmsg#
|
" set statusline+=%#warningmsg#
|
||||||
" set statusline+=%{SyntasticStatuslineFlag()}
|
" set statusline+=%{SyntasticStatuslineFlag()}
|
||||||
" set statusline+=%*
|
" set statusline+=%*
|
||||||
set statusline=%{pathshorten(expand('%:f'))}
|
set statusline=%{pathshorten(expand('%:f'))}
|
||||||
|
|
||||||
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle
|
||||||
|
|
||||||
" FZF
|
|
||||||
"nnoremap <silent> <C-p> :FZF -m<cr>
|
|
||||||
"let $FZF_DEFAULT_COMMAND = 'ag -g ""'
|
|
||||||
let g:fzf_history_dir = '~/.local/share/fzf-history'
|
|
||||||
|
|
||||||
" vim-easy-align
|
|
||||||
|
|
||||||
" Start interactive EasyAlign in visual mode (e.g. vipga)
|
|
||||||
xmap ga <Plug>(EasyAlign)
|
|
||||||
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
|
||||||
nmap ga <Plug>(EasyAlign)
|
|
||||||
let g:scratchpad_ftype = 'md'
|
|
||||||
|
|
||||||
" NERDTree
|
|
||||||
" Help w/ lag
|
|
||||||
let g:NERDTreeLimitedSyntax = 1
|
|
||||||
|
|
||||||
let s:brown = "964B00"
|
|
||||||
let s:aqua = "3AFFDB"
|
|
||||||
let s:blue = "689FB6"
|
|
||||||
let s:darkBlue = "44788E"
|
|
||||||
let s:purple = "834F79"
|
|
||||||
let s:lightPurple = "834F79"
|
|
||||||
let s:red = "AE403F"
|
|
||||||
let s:beige = "F5C06F"
|
|
||||||
let s:yellow = "F09F17"
|
|
||||||
let s:orange = "D4843E"
|
|
||||||
let s:darkOrange = "F16529"
|
|
||||||
let s:pink = "CB6F6F"
|
|
||||||
let s:salmon = "EE6E73"
|
|
||||||
let s:green = "8FAA54"
|
|
||||||
let s:lightGreen = "31B53E"
|
|
||||||
let s:white = "FFFFFF"
|
|
||||||
let s:rspec_red = 'FE405F'
|
|
||||||
let s:git_orange = 'F54D27'
|
|
||||||
|
|
||||||
" If you have vim-devicons you can customize your icons for each file type.
|
|
||||||
let g:NERDTreeExtensionHighlightColor = {} "this line is needed to avoid error
|
|
||||||
let g:NERDTreeExtensionHighlightColor['java'] = s:lightGreen "assigning it to an empty string will skip highlight
|
|
||||||
|
|
||||||
let g:jdbPort="5005"
|
|
||||||
|
|
||||||
" Set a nicer foldtext function
|
|
||||||
set foldtext=MyFoldText()
|
|
||||||
function! MyFoldText()
|
|
||||||
let line = getline(v:foldstart)
|
|
||||||
if match( line, '^[ \t]*\(\/\*\|\/\/\)[*/\\]*[ \t]*$' ) == 0
|
|
||||||
let initial = substitute( line, '^\([ \t]\)*\(\/\*\|\/\/\)\(.*\)', '\1\2', '' )
|
|
||||||
let linenum = v:foldstart + 1
|
|
||||||
while linenum < v:foldend
|
|
||||||
let line = getline( linenum )
|
|
||||||
let comment_content = substitute( line, '^\([ \t\/\*]*\)\(.*\)$', '\2', 'g' )
|
|
||||||
if comment_content != ''
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let linenum = linenum + 1
|
|
||||||
endwhile
|
|
||||||
let sub = initial . ' ' . comment_content
|
|
||||||
else
|
|
||||||
let sub = line
|
|
||||||
let startbrace = substitute( line, '^.*{[ \t]*$', '{', 'g')
|
|
||||||
if startbrace == '{'
|
|
||||||
let line = getline(v:foldend)
|
|
||||||
let endbrace = substitute( line, '^[ \t]*}\(.*\)$', '}', 'g')
|
|
||||||
if endbrace == '}'
|
|
||||||
let sub = sub.substitute( line, '^[ \t]*}\(.*\)$', '...}\1', 'g')
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
let n = v:foldend - v:foldstart + 1
|
|
||||||
let info = " " . n . " lines"
|
|
||||||
let sub = sub . " "
|
|
||||||
let num_w = getwinvar( 0, '&number' ) * getwinvar( 0, '&numberwidth' )
|
|
||||||
let fold_w = getwinvar( 0, '&foldcolumn' )
|
|
||||||
let sub = strpart( sub, 0, winwidth(0) - strlen( info ) - num_w - fold_w - 1 )
|
|
||||||
return sub . info
|
|
||||||
endfunction
|
|
||||||
|
@ -8,100 +8,9 @@ highlight ExtraWhitespace ctermbg=red
|
|||||||
let g:cpp_class_scope_highlight = 1
|
let g:cpp_class_scope_highlight = 1
|
||||||
let g:cpp_experimental_template_highlight = 1
|
let g:cpp_experimental_template_highlight = 1
|
||||||
|
|
||||||
" AirLine visual settings
|
|
||||||
if !exists('g:airline_symbols')
|
|
||||||
let g:airline_symbols = {}
|
|
||||||
endif
|
|
||||||
|
|
||||||
let g:airline_theme='onedark'
|
|
||||||
" let g:airline_stl_path_style = 'short'
|
|
||||||
|
|
||||||
let g:airline#extensions#coc#enabled = 1
|
|
||||||
|
|
||||||
let g:airline_left_sep=''
|
|
||||||
let g:airline_left_alt_sep = ''
|
|
||||||
let g:airline_right_sep=''
|
|
||||||
let g:airline_right_alt_sep = ''
|
|
||||||
let g:airline_symbols.branch = ''
|
|
||||||
let g:airline_symbols.readonly = ''
|
|
||||||
let g:airline_symbols.dirty = ''
|
|
||||||
let g:airline_symbols.linenr = ''
|
|
||||||
"let g:airline_symbols.whitespace = 'Ξ'
|
|
||||||
let g:airline_powerline_fonts = 1
|
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
|
||||||
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
|
|
||||||
let g:airline#extensions#tabline#show_buffers = 0
|
|
||||||
let g:airline#extensions#tabline#show_splits = 1
|
|
||||||
let g:airline#extensions#tabline#show_tabs = 1
|
|
||||||
let g:airline#extensions#tabline#show_tab_nr = 0
|
|
||||||
let g:airline#extensions#tabline#show_tab_type = 0
|
|
||||||
let g:airline#extensions#tabline#exclude_preview = 1
|
|
||||||
let g:airline#extensions#tabline#show_close_button = 0
|
|
||||||
let g:airline#extensions#tabline#fnamemod = ':t'
|
|
||||||
|
|
||||||
lua << EOF
|
|
||||||
function getCitc()
|
|
||||||
local fname = vim.api.nvim_buf_get_name(0)
|
|
||||||
if string.find(fname, '/google/src/cloud/', 1, true) then
|
|
||||||
local parts = split(fname, '/')
|
|
||||||
return parts[5]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
EOF
|
|
||||||
|
|
||||||
" let g:airline_section_c = execute("lua getCitc()")
|
|
||||||
|
|
||||||
let g:airline_mode_map = {
|
|
||||||
\ '__' : '------',
|
|
||||||
\ 'n' : 'NORMAL',
|
|
||||||
\ 'c' : 'COMMAND',
|
|
||||||
\ 'i' : 'INSERT',
|
|
||||||
\ 'R' : 'REPLACE',
|
|
||||||
\ 's' : 'SELECT',
|
|
||||||
\ 'S' : 'S-LINE',
|
|
||||||
\ '' : 'S-BLOCK',
|
|
||||||
\ 'v' : 'VISUAL',
|
|
||||||
\ 'V' : 'V-LINE',
|
|
||||||
\ '' : 'V-BLOCK',
|
|
||||||
\ }
|
|
||||||
|
|
||||||
let g:PaperColor_Theme_Options = {
|
|
||||||
\ 'language': {
|
|
||||||
\ 'python': {
|
|
||||||
\ 'highlight_builtins' : 1
|
|
||||||
\ },
|
|
||||||
\ 'cpp': {
|
|
||||||
\ 'highlight_standard_library': 1
|
|
||||||
\ },
|
|
||||||
\ 'c': {
|
|
||||||
\ 'highlight_builtins' : 1
|
|
||||||
\ }
|
|
||||||
\ },
|
|
||||||
\ 'theme': {
|
|
||||||
\ 'default.dark': {
|
|
||||||
\ 'transparent_background': 1
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
|
||||||
" Function to let me know what syntax hilighting group is under the cursor.
|
" Function to let me know what syntax hilighting group is under the cursor.
|
||||||
" Not used often
|
" Not used often
|
||||||
function! SynGroup()
|
function! SynGroup()
|
||||||
let l:s = synID(line('.'), col('.'), 1)
|
let l:s = synID(line('.'), col('.'), 1)
|
||||||
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
function! PhpSyntaxOverride()
|
|
||||||
" Put snippet overrides in this function.
|
|
||||||
hi! link phpDocTags phpDefine
|
|
||||||
hi! link phpDocParam phpType
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
augroup phpSyntaxOverride
|
|
||||||
autocmd!
|
|
||||||
autocmd FileType php call PhpSyntaxOverride()
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
|
|
||||||
" Highlight the symbol and its references when holding the cursor.
|
|
||||||
|
@ -82,6 +82,7 @@ call plug#begin('~/.vim/plugged')
|
|||||||
if filereadable(expand("~/.vimrc.local"))
|
if filereadable(expand("~/.vimrc.local"))
|
||||||
source ~/.vimrc.local
|
source ~/.vimrc.local
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if filereadable(expand("~/use_google"))
|
if filereadable(expand("~/use_google"))
|
||||||
source ~/.vim/prefs/google.vim
|
source ~/.vim/prefs/google.vim
|
||||||
endif
|
endif
|
||||||
@ -93,6 +94,9 @@ call plug#begin('~/.vim/plugged')
|
|||||||
source ~/.vim/prefs/golang.vim
|
source ~/.vim/prefs/golang.vim
|
||||||
source ~/.vim/prefs/ultisnips.vim
|
source ~/.vim/prefs/ultisnips.vim
|
||||||
source ~/.vim/prefs/ripgrep.vim
|
source ~/.vim/prefs/ripgrep.vim
|
||||||
|
source ~/.vim/prefs/fzf.vim
|
||||||
|
source ~/.vim/prefs/devicons.vim
|
||||||
|
source ~/.vim/prefs/airline.vim
|
||||||
call plug#end() " required
|
call plug#end() " required
|
||||||
|
|
||||||
" Require CiderLSP and Diagnostics modules
|
" Require CiderLSP and Diagnostics modules
|
||||||
@ -155,3 +159,6 @@ set omnifunc= completeopt=menuone,noinsert,noselect
|
|||||||
|
|
||||||
let g:lsp_log_verbose = 1
|
let g:lsp_log_verbose = 1
|
||||||
let g:lsp_log_file = expand('~/vim-lsp.log')
|
let g:lsp_log_file = expand('~/vim-lsp.log')
|
||||||
|
|
||||||
|
"Don't ask to save when changing buffers (i.e. when jumping to a type definition)
|
||||||
|
set hidden
|
||||||
|
@ -62,6 +62,7 @@ alias plxutil='/google/data/ro/teams/plx/plxutil'
|
|||||||
export HGSHORT_CMDS="cat head tail mv cp rm chmod g4 diff merge patch meld trim less more"
|
export HGSHORT_CMDS="cat head tail mv cp rm chmod g4 diff merge patch meld trim less more"
|
||||||
source /etc/bash_completion.d/hgd
|
source /etc/bash_completion.d/hgd
|
||||||
alias hgd='source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd-local.sh'
|
alias hgd='source /google/src/head/depot/google3/experimental/fig_contrib/hgshort/hgd-local.sh'
|
||||||
|
alias builddoctor=/google/bin/releases/build-doctor/builddoctor
|
||||||
|
|
||||||
export ACID_STARTUP_SCRIPT_PATH=~/acid_startup.sh
|
export ACID_STARTUP_SCRIPT_PATH=~/acid_startup.sh
|
||||||
export PATH=$PATH:/usr/local/google/home/cnieves/.local/binexport PATH=$PATH:/usr/local/google/home/cnieves/.local/bin
|
export PATH=$PATH:/usr/local/google/home/cnieves/.local/binexport PATH=$PATH:/usr/local/google/home/cnieves/.local/bin
|
||||||
|
@ -13,7 +13,7 @@ autoload -Uz add-zsh-hook
|
|||||||
add-zsh-hook chpwd g3path::hook
|
add-zsh-hook chpwd g3path::hook
|
||||||
|
|
||||||
g3path::zle::accept-line () {
|
g3path::zle::accept-line () {
|
||||||
if [[ -n $GOOGLE3_ROOT && ! $BUFFER =~ \\s*(blaze|g4|p4|g4d|add_dep|buildozer|build_cleaner|debug_android_lint|rabbit|hb|gqui) ]]; then
|
if [[ -n $GOOGLE3_ROOT && ! $BUFFER =~ \\s*(blaze|g4|p4|g4d|add_dep|buildozer|build_cleaner|debug_android_lint|rabbit|hb|gqui|builddoctor) ]]; then
|
||||||
BUFFER=${BUFFER// \/\// $GOOGLE3_ROOT\/}
|
BUFFER=${BUFFER// \/\// $GOOGLE3_ROOT\/}
|
||||||
fi
|
fi
|
||||||
zle .accept-line
|
zle .accept-line
|
||||||
|
Reference in New Issue
Block a user