--
--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
> Is there a way that I can do "refresh" or "reload" without quit the re-open the file to see updated contents?
The 'autoread' option does this. This works well in gvim because there is an implicit
:checktime
when gvim regains the input focus. See :help timestamp.
If you want a vim in a terminal to refresh, or gvim without getting the input focus, one can use the client-server stuff to tell vim to check if the file has changed. See :help client-server.
Regards, John Little
In mappings you must either escape the | or use <Bar>.
map <f9> :new\|:r #\|:1d
map <f9> :new<Bar>:r #<Bar>:1d
Otherwise, Vim sees this as:
map <F9> :new
Followed by a separate :r # command.
Actually, this is best written without the redundant : characters, and you will need to end command-line mode with <CR>:
map <f9> :new\|r #\|1d<CR>
As I mentioned back in February, if you have 'undofile' and 'undoreload' set properly, you can actually undo reading in the file if it abandoned your unsaved changes.