On Tuesday, November 6, 2012 7:05:33 PM UTC-6, analogsix wrote:
> I type in vim -O3 file1.sv file2.sv file3.svh file4.sv file5.sv
>
> I get 3 windows and 5 buffers. The active window/buffer IS syntax highlighted.
> The inactive ones ARE NOT until I ^Ww through them. This may have something to
> do with the BufEnter event... so I tried VimEnter instead. In the latter case,
> none were highlighted.
>
Because you used BufEnter, this is expected. BufEnter means "when the cursor
enters a buffer". It looks like :help BufEnter may be a little misleading here.
What you want is "when Vim reads a file into memory to create the buffer" and
probably also "when Vim creates a buffer for a new file". For the first, use
BufRead. For the second, BufNewFile. Gary actually suggested this in a prior
message, and it should work as you intend.
However, this is NOT the standard way to apply a filetype and syntax to a
filetype Vim does not yet recognize. See :help new-filetype for the standard
method. I highly recommend you use it.
I have no idea why you tried VimEnter. Granted, this ought to have worked for a
single buffer. However, VimEnter fires once, in the context the first buffer
being edited, after Vim starts up and after initialization. It has nothing to do
with loading buffers.
> So I entered :verbose set filetype? syntax?
>
> I see:
> filetype=
> syntax=
> Last set from /usr/share/vim/vim70/syntax.vim
>
> version is HUGE with GTK2 GUI
>
It doesn't matter for this problem, but your version string should also include
the numeric version of Vim, in my case 7.3.709 for example.
> Guess my syntax files are not getting fired up
>
> My co-worker was the one who originally passed me the systemverilog.vim syntax
> file. He doesn't have mastery over VIM scripting. I also used a copy of his
> .vimrc. thanks for bearing with me.
>
> This is why I've been ramping up my VIM learning; I'm also doing it to set up
> an optimal SystemVerilog code editing environment complete with plugins. My
> new boss said to me "it's either you learn VIM or Emacs, and I chose VIM even
> though Emacs is popular with the Verilog-mode." At any rate, learning on VIM
> has led me down the rabbit hole of reading the majority of Arnold Robbins'
> Learning Vi and VIM (haven't yet finished scripting and the programming
> stuff... altho its not very succinctly written), reading different sections of
> the VimUserManual and Reference, as well as exploring the directory structure
> of /usr/share/vim/vim70/ directories as well as file contents therein. Hence I
> created my own ~/.vim directory and mkdired the following sub-directories:
> syntax/, plugin/, filetype/ (they're all empty except syntax/). But I'm still
> figuring out VIM's execution sequence of RC files. I know it reads a bunch of
> stuff in the /usr/share/.. directory but I've been led to believe it LASTLY
> checks out your $HOME directory for a .vimrc file and somewhere I read someone
> put their .vimrc in a ~/.vim/ directory. At the very last it checks out .vimrc
> files in your CURRENT directory, which I'm not having anything to do with now.
>
Vim does NOT by default read a .vimrc in your current directory. Only your
$HOME directory, a.k.a. ~ directory.
> I'm trying to master how to set up my directory $HOME structure with respect
> to VIM. What files go where? On skimming through Gary's response, I see he
> mentions a bit of that.
>
> Other references I refer to (I plan on getting plugins installed in the near future):
> - the general internet
> - VIM Wikia
> - Vimscripts on Github, from where I found Vundle plugin (plugin for plugin management)
> - http://learnvimscriptthehardway.stevelosh.com/
> - http://net.tutsplus.com/sessions/vim-essential-plugins/
> plug-ins I'm interested in
> - Vundle
> - NerdTree
> - VimShell
> Onto replying to Gary...
I consider these two to be my only "must have" plugins:
1. Gundo (but see also the alternatives): Script page is
http://www.vim.org/scripts/script.php?script_id=3304 , a good writeup with
some alternatives is here: http://vim.wikia.com/wiki/Using_undo_branches
2. Surround: http://www.vim.org/scripts/script.php?script_id=1697
I'm not sure how useful Surround is for Verilog. If you install Surround you
probably also want Repeat: http://www.vim.org/scripts/script.php?script_id=2136.
More recent versions of both are available on the github page linked from each
script page.
--
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
Wednesday, November 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment