Editing verilog file in vim

173 views
Skip to first unread message

googler

unread,
Oct 19, 2010, 11:24:18 PM10/19/10
to vim_use
I am trying to use (g)vim to edit verilog files. I see proper syntax
highlighting, but keyword matching (for example, 'begin' is supposed
to match with 'end') is not working. I read up some of the earlier
posts in this group regarding usage of vim for verilog, but can't seem
to find the solution. Can someone please help me get vim working for
verilog files? I am using vim version 7.2. I do see the file
verilog.vim in ftplugin directory. This is what my .vimrc file looks
like.

set nocompatible
filetype indent plugin on
syntax on
set hidden
set wildmenu
set showcmd
set hlsearch
set ignorecase
set smartcase
set backspace=indent,eol,start
set autoindent
set nostartofline
set ruler
set laststatus=2
set confirm
set visualbell
set t_vb=
set mouse=a
set cmdheight=2
set number
set notimeout ttimeout ttimeoutlen=200
set pastetoggle=<F11>
set shiftwidth=2
set softtabstop=2
set expandtab
map Y y$
nnoremap <C-L> :nohl<CR><C-L>


Also, from a more general standpoint, when we are trying to use a new
filetype/language in vim (like verilog), what are the different
features/plugins that we need to make sure are available? For example,
it should have syntax highlighting, keyword matching, etc.. and what
else? And where are the plugins for these features usually located?

Thanks!

Mun

unread,
Oct 21, 2010, 3:32:15 PM10/21/10
to vim_use
Hi,

On Tue, Oct 19, 2010 at 08:24 PM PDT, googler wrote:
g> I am trying to use (g)vim to edit verilog files. I see proper syntax
g> highlighting, but keyword matching (for example, 'begin' is supposed
g> to match with 'end') is not working.

I have attached a file (verilog.vim) that you can place in
~/.vim/ftplugin/verilog and it should do what you need.

Regards,

--
Mun

g> I read up some of the earlier
g> posts in this group regarding usage of vim for verilog, but can't seem
g> to find the solution. Can someone please help me get vim working for
g> verilog files? I am using vim version 7.2. I do see the file
g> verilog.vim in ftplugin directory. This is what my .vimrc file looks
g> like.
g>
g> set nocompatible
g> filetype indent plugin on
g> syntax on
g> set hidden
g> set wildmenu
g> set showcmd
g> set hlsearch
g> set ignorecase
g> set smartcase
g> set backspace=indent,eol,start
g> set autoindent
g> set nostartofline
g> set ruler
g> set laststatus=2
g> set confirm
g> set visualbell
g> set t_vb=
g> set mouse=a
g> set cmdheight=2
g> set number
g> set notimeout ttimeout ttimeoutlen=200
g> set pastetoggle=<F11>
g> set shiftwidth=2
g> set softtabstop=2
g> set expandtab
g> map Y y$
g> nnoremap <C-L> :nohl<CR><C-L>
g>
g>
g> Also, from a more general standpoint, when we are trying to use a new
g> filetype/language in vim (like verilog), what are the different
g> features/plugins that we need to make sure are available? For example,
g> it should have syntax highlighting, keyword matching, etc.. and what
g> else? And where are the plugins for these features usually located?
g>
g> Thanks!
g>
g> --
g> You received this message from the "vim_use" maillist.
g> Do not top-post! Type your reply below the text you are replying to.
g> For more information, visit http://www.vim.org/maillist.php

verilog.vim
Reply all
Reply to author
Forward
0 new messages