diff --git a/nvim/.config/nvim/plugin/mappings.vim b/nvim/.config/nvim/plugin/mappings.vim index 22bb8ce2..958e2994 100644 --- a/nvim/.config/nvim/plugin/mappings.vim +++ b/nvim/.config/nvim/plugin/mappings.vim @@ -32,3 +32,14 @@ endif " a - enter insert mode " u - break undo sequence (new change) inoremap u[s1z=`]au + +" Do Shebang line +" - go into normal mode +" :silent - run command silently +" s/^/…/ - write at the begining of the line +" - used to seperate commands +" filetype detect - attempt to detect filetype again +" :nohlsearch - un-hilight the search pattern +inoremap :silent s/^/#!\/usr\/bin\/env / filetype detect:nohlsearcho +" alternative: inoremap :silent exe ".!which " s/^/#!/ filetype detectYpDi +