Closed jerri closed 12 years ago
Don't lose your finger-knowledge just for this! ;)
I use the insert mode shortcut all the time (I use ",", though). The idea is to be able to create a new note at (almost) any time, regardless of mode (which is not really "the vim way", but anyway...).
You can disable the default shortcuts putting
let g:pad_use_default_mappings = 0
in your vimrc
, and then setting the mappings you want (you can then simply not add any shortcut for insert mode).
nmap <C-esc> <Plug>PadListPads
nmap <S-esc> <Plug>PadOpenPad
nmap <leader>s <Plug>PadSearchPads
This is suggested in the documentation.
Thanks for your answer. I saw the info about setting your own mappings. This issue was just a note, that something unexpected and impractical happens if you use the default-configuration for this plugin and vim. Might be a problem for new users who will be surprised why they are not anymore able to enter \n into their code. :)
Did the change nevertheless with leader, because "\" really is less simple to hit than ",".
btw: Your mapping examples here in the issue and in the documentation are wrong. Seems like you changed the names of the actions. Correct configuration would be
nmap <C-esc> <Plug>ListPads
nmap <S-esc> <Plug>OpenPad
nmap <leader>s <Plug>SearchPads
This is also wrong in the file doc/pad.txt.
Or am I doing something wrong?
No, you are absolutely right. I just forgot the details, so I consulted the documentation, LOL. I'm fixing it now.
I just had an idea. What about chaging the g:use_default_mappings variable so a value of 0 disables the mappings, a value of 1 maps things in normal mode only, and a value of 2 maps things in both insert and normal modes? To avoid surprises, the default value would be 1.
That's a great idea! Go for it! :)
Pushed this change to 0899336c044c13bd5c926b5605b4334db13c9ef0. Closing this issue.
The default for is the backslash. So n becomes \n which is used quite often if you want to output something with a newline.
I will now change the configuration of to ",", which means I will have to relearn a lot of finger-knowledge.
Question is whether this shortcut is even necessary. Do I really have to be able to start a new note from within insert-mode?
Apart from that great plugin! Continue the great work!