Saturday, May 2, 2015

Re: reverting keymaps for location-list buffer

Dear John,

thank you very much for the answer and sorry for the doubled topic
(I was used to mailinglists and a kind of immediate feedback so got confused by the topic structure of google groups. I wrote a mail and meantime because of no response also posted a topic - where I still got no response. Hours later both were put online)

put the line into the mentioned file,
➜  ~  cat
​~/​
vimfiles/ftplugin/qf.vim 
nnoremap <buffer> <CR> <CR>
 
but still get a "E21: Cannot make changes, 'modifiable' is off" due to my remapping <CR> o<CR>, so it wasn't written back.
(this happens in a location-list window opened by syntastic)

is the vimfiles folder maybe wrong? must it be somewhere under .vim/ maybe?

best,
Stephan

On 2 May 2015 at 08:45, John Beckett <johnb.beckett@gmail.com> wrote:
Stephan Sahm wrote:
> I remapped <CR> and I really like my remapping. There are
> however some problems For quickfix buffers I found this:
>
> autocmd BufReadPost quickfix nnoremap <CR> <CR>
>
> is there something similar for location-list buffers?

To make Enter work normally in a quickfix window, rather than
rely on auto commands, you can create file:

~/vimfiles/ftplugin/qf.vim

containing the single line:

nnoremap <buffer> <CR> <CR>

The above is all that is needed to make Enter behave as Enter
in quickfix and local-list buffers (in normal mode, which is
all you need).

John


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment