:autocmd Filetype netrw echom "Greetings from netrw"

64 views
Skip to first unread message

Kiryph

unread,
Jun 21, 2016, 3:56:45 PM6/21/16
to vim_use
Following autocmd Filetype does not trigger when I enter a netrw window

:autocmd Filetype netrw echom "Greetings from netrw"

I have tried following minimal approach:

$ vim -C -u NONE
:so $VIMRUNTIME/plugin/netrwPlugin.vim
:autocmd Filetype netrw echom "Greetings from netrw"
:E .
:messages

I miss the message from my autocommand.

What am I doing wrong?


$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 17 2016 05:04:31)
MacOS X (unix) version
Included patches: 1-1831
Compiled by _spot...@Traviss-Mac-747.local
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt -tcl
+balloon_eval +folding +mouse_xterm +termguicolors
+browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +fullscreen -mzscheme +textobjects
+channel -gettext +netbeans_intg +timers
+cindent -hangul_input +odbeditor +title
+clientserver +iconv +packages +toolbar
+clipboard +insert_expand +path_extra +transparency
+cmdline_compl +job +perl/dyn +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent +python3/dyn +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui +lua/dyn +rightleft +windows
+diff +menu +ruby/dyn +writebackup
+digraphs +mksession +scrollbind -X11
+dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape +startuptime -xsmp
+eval +mouse_dec +statusline -xterm_clipboard
+ex_extra -mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax -xpm
+farsi +mouse_netterm +tag_binary

Tumbler Terrall

unread,
Jun 22, 2016, 3:08:40 PM6/22/16
to vim_use

> Following autocmd Filetype does not trigger when I enter a netrw window
>
> :autocmd Filetype netrw echom "Greetings from netrw"

netrw executes all of its autocmd's silently. Therefore any echo commands will have no effect. If you're simply trying to verify that the command is going through, try setting a variable. More info on the topic can be found here:
http://vi.stackexchange.com/questions/8365/au-filetype-netrw-echom-ft-is-now-netrw-does-not-show-up-in-messages

Charles E Campbell

unread,
Jun 22, 2016, 3:19:23 PM6/22/16
to vim...@googlegroups.com
I've changed that in netrw v157h. Consider that change as experimental
-- if I don't get complaints, it may stay that way. You can get v157h
from my website: http://www.drchip.org/astronaut/vim/index.html#NETRW .

Regards,
Chip Campbell
Reply all
Reply to author
Forward
0 new messages