This commit is contained in:
Christian Nieves
2022-10-12 22:09:57 +00:00
parent 27ea228fe1
commit 450dd13e5b
9 changed files with 32 additions and 20 deletions

View File

@ -12,7 +12,8 @@ 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 whatsout --template= -- 2>/dev/null'
let s:hg_command = 'hg pstatus -ma -n --template= -- 2>/dev/null'
let s:rg_command = 'rg --ignore-case --hidden --follow --color auto --line-number'
command! -bang FzfHgFiles
\ call fzf#run(fzf#wrap({
@ -20,7 +21,7 @@ command! -bang FzfHgFiles
\ }),
\ <bang>0
\ )
command! -bang -nargs=* FzfHgRg
command! -bang -nargs=* ClSearch
\ call fzf#vim#grep(
\ s:rg_command . " " . <q-args> . " " . "$(" . s:hg_command . ")", 1,
\ <bang>0 ? fzf#vim#with_preview('up:60%')

View File

@ -3,6 +3,7 @@ lua << EOF
require('google.comments').setup {
-- The command for fetching comments, refer to `get_comments.par --help` to
-- see all the options.
-- command = {'/google/bin/releases/editor-devtools/get_comments.par', '--full', '--json', "-x=''"},
command = {'/google/bin/releases/editor-devtools/get_comments.par', '--json', '--full', '--noresolved', '--cl_comments', '--file_comments', ' -x ""'},
-- Define your own icon by `vim.fn.sign_define('ICON_NAME', {text = ' '})`.
-- See :help sign_define
@ -17,6 +18,11 @@ require('google.comments').setup {
-- When showing file paths, use relative paths or not.
relative_path = true,
},
--- Enable viewing comments through floating window
floating = true,
--- Options used when creating the floating window.
floating_window_options = require('google.comments.options')
.default_floating_window_options,
}
-- here are some mappings you might want:
vim.api.nvim_set_keymap('n', '<Leader>nc',
@ -36,3 +42,4 @@ vim.fn.sign_define('COMMENT_ICON', {text = ''})
EOF
autocmd InsertLeave * :lua require('google.comments').update_signs()
autocmd InsertLeave * :GoogleCommentsFetchComments

View File

@ -1,5 +1,3 @@
source ~/.vim/prefs/google_comments.vim
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp
set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch

View File

@ -29,9 +29,10 @@ vmap <leader>v c<ESC>"+p<ESC>
imap <leader>v <ESC>"+pa
" Copy to OS clipboard
" vnoremap <silent><Leader>y "yy <Bar> :call system('xclip', @y)<CR>
map <leader>y !xclip -selection clipboard
vmap <leader>y !xclip -selection clipboard<cr>
vnoremap <leader>y "yy <Bar> :call system('xclip', @y)<CR>
map <leader>y "yy <Bar> :call system('xclip', @y)<CR>
" map <leader>y !xclip -selection clipboard
" vmap <leader>y !xclip -selection clipboard<cr>
" map <leader>y "+Y
" vmap <leader>y "+y
@ -96,7 +97,7 @@ let g:NERDCommentEmptyLines = 1
" Enable trimming of trailing whitespace when uncommenting
let g:NERDTrimTrailingWhitespace = 1
"Enable NERDCommenterToggle to check all selected lines is commented or not
"Enable NERDCommenterToggle to check all selected lines is commented or not
let g:NERDToggleCheckAllLines = 1
nnoremap <leader>c<Space> :call nerdcommenter#Comment(0,"toggle")<CR>
@ -112,3 +113,5 @@ nmap <leader>e :e %%
" replace currently selected text with default register
" without yanking it
vnoremap <leader>p "_dP
nnoremap <leader>rp :VimuxOpenRunner<cr> :VimuxRunCommand '!!'<cr> :call VimuxSendKeys("Enter")<cr>

View File

@ -1,7 +0,0 @@
" ONE LINERS ONLY
" set statusline+=%#warningmsg#
" set statusline+=%{SyntasticStatuslineFlag()}
" set statusline+=%*
set statusline=%{pathshorten(expand('%:f'))}
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle

View File

@ -43,8 +43,7 @@ Plug 'junegunn/gv.vim' " git commit browser
Plug 'tpope/vim-git'
Plug 'airblade/vim-gitgutter' " live git diff gutter
Plug 'tmux-plugins/vim-tmux' " tmux
Plug 'benmills/vimux'
Plug 'nvim-lua/plenary.nvim'
Plug 'preservim/vimux'
Plug 'christoomey/vim-tmux-navigator' " tmux
Plug 'ferrine/md-img-paste.vim' " copy-paste images to markdown
Plug 'junegunn/vim-easy-align' " markdown table aligns
@ -127,3 +126,8 @@ Plug 'kristiandupont/shades-of-teal'
Plug 'joshdick/onedark.vim'
Plug 'google/vim-colorscheme-primary'
Plug 'kyoz/purify', { 'rtp': 'vim' }
" ONE LINERS ONLY
set statusline=%{pathshorten(expand('%:f'))}
let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle

View File

@ -89,7 +89,6 @@ call plug#begin('~/.vim/plugged')
source ~/.vim/prefs/mappings.vim
source ~/.vim/prefs/leader.vim
source ~/.vim/prefs/plug_prefs.vim
source ~/.vim/prefs/ui.vim
source ~/.vim/prefs/golang.vim
source ~/.vim/prefs/ultisnips.vim
@ -115,6 +114,7 @@ EOF
if filereadable(expand("~/use_google"))
source ~/.vim/prefs/cmp.vim
source ~/.vim/prefs/imp.vim
source ~/.vim/prefs/google_comments.vim
endif
filetype plugin on " redundant?