Dont substitute -- for — way to many commands use --word [ENHANCEMENT REQUEST]
Hi, I am using your super useful plugin to document some bash use cases
Things that I use every now and again but tend to forget, instead of having to re-hunt them on the web
more often than not I notice commands like
git update-index --assume-unchanged file
substituted for
git update-index —assume-unchanged file
maybe switch for 3 dashes for the substitution, or ignore the rule when inside `
I think that the substitution is already ignored when inside triple {}, but doesn't serve my purpose as much as `
Thanks
Removing the substitution
If you'd like to remove the -- to — substitution completely, put iunmap <buffer> -- in your vimrc.
Edit: Actually that's probably not enough. The mapping is defined when you open Notes files, which happens after reading your vimrc.
This should really be executed after opening a Notes file and after the plugin mappings have been defined. I'm not sure how to do that, so I can only offer the second solution:
Changing plugin code
The mapping is defined in ftplugin/notes.vim in line 62 (as of commit e465a0a987dbacdf7291688215b8545f8584d409) :
62| inoremap <buffer> <expr> -- xolox#notes#insert_em_dash()
63| let b:undo_ftplugin .= ' | execute "iunmap <buffer> --"'
Here you could change it to something else, like ---. If you do, remember to change line 63 as well. It contains an unmap function for the previosly defined mapping that is called at some point. If it differs, you'll get an error message when opening a Notes file.
Thanks, will do. Again, love the plugin