Update gitconfig and nvimrc
This commit is contained in:
parent
17129976de
commit
f150038717
|
@ -71,7 +71,7 @@
|
|||
sqls = !git sq $(git ls)
|
||||
sqt = merge --squash -s recursive -X theirs
|
||||
ss = stash save
|
||||
st = status
|
||||
st = stash
|
||||
sy = !gitsha1yank -s
|
||||
sum = show --stat
|
||||
undo = reset --soft HEAD^
|
||||
|
|
7
nvimrc
7
nvimrc
|
@ -287,6 +287,13 @@ vim.api.nvim_set_keymap("n", "<leader>cq", [[:lua _G.close_tests()<cr>]], {norem
|
|||
vim.api.nvim_set_keymap("n", "<leader>cc", [[:lua _G.copy_test_cmd()<cr>]], {noremap = true, silent = true})
|
||||
EOF
|
||||
|
||||
" Function to eat trailing character when applying iabbrevs.
|
||||
" https://stackoverflow.com/questions/11858927/preventing-trailing-whitespace-when-using-vim-abbreviations
|
||||
func Eatchar(pat)
|
||||
let c = nr2char(getchar(0))
|
||||
return (c =~ a:pat) ? '' : c
|
||||
endfunc
|
||||
|
||||
" Git mappings
|
||||
"
|
||||
" Copy Git permalink to clipboard for either current line or range
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
" https://stackoverflow.com/questions/11858927/preventing-trailing-whitespace-when-using-vim-abbreviations
|
||||
func Eatchar(pat)
|
||||
let c = nr2char(getchar(0))
|
||||
return (c =~ a:pat) ? '' : c
|
||||
endfunc
|
||||
|
||||
iabbrev clog console.log("<c-r>=Eatchar('\s')<cr>
|
||||
iabbrev cdeb console.debug("<c-r>=Eatchar('\s')<cr>
|
||||
iabbrev cerr console.error("<c-r>=Eatchar('\s')<cr>
|
||||
iabbrev cwar console.warn("<c-r>=Eatchar('\s')<cr>
|
||||
|
||||
|
|
Loading…
Reference in New Issue