diff --git a/gitconfig b/gitconfig index dfdaa0a..f10b702 100644 --- a/gitconfig +++ b/gitconfig @@ -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^ diff --git a/nvimrc b/nvimrc index 66cab79..a8d8091 100644 --- a/nvimrc +++ b/nvimrc @@ -287,6 +287,13 @@ vim.api.nvim_set_keymap("n", "cq", [[:lua _G.close_tests()]], {norem vim.api.nvim_set_keymap("n", "cc", [[:lua _G.copy_test_cmd()]], {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 diff --git a/vim/after/ftplugin/javascript.vim b/vim/after/ftplugin/javascript.vim index 4adaf5b..604809a 100644 --- a/vim/after/ftplugin/javascript.vim +++ b/vim/after/ftplugin/javascript.vim @@ -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("=Eatchar('\s') iabbrev cdeb console.debug("=Eatchar('\s') iabbrev cerr console.error("=Eatchar('\s') iabbrev cwar console.warn("=Eatchar('\s') -