andri-ch / gotoword

vim plugin that gives users the possibility to write and access documentation about the word or expr. under cursor
GNU Lesser General Public License v3.0
0 stars 0 forks source link

make :w to display: "use HelperSave to save data, not :w; for more info :HelperHelp" #6

Open andri-ch opened 9 years ago

andri-ch commented 9 years ago

when editing buffer contents and using :w instead of HelperSave, use Vim events to run an autocommand that prompts for HelperSave, not :w. test if you can save with :w, because the buffer should be readonly, so only HelperSave should work. Indeed, when user does :w, an error message appears: E382: cannot write, 'buftype' option is set

I should adjust error message to also write: use HelperSave to save data added.

Or make :w to call HelperSave ... well, user might be confused

andri-ch commented 8 years ago

here's an example of how to remap :w [http://askubuntu.com/a/74503/73999]