~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/vim/.vim/after/ftplugin/vhdl.vim -rw-r--r-- 830 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
" VHDL filetype plugin
" Author: Greg Anders <greg@gpanders.com>

let b:undo_ftplugin = get(b:, 'undo_ftplugin', '')

" VHDL uses -- as comment string
setlocal comments=:--
setlocal commentstring=--%s

" VHDL is case insensitive
setlocal tagcase=ignore
setlocal ignorecase
setlocal nosmartcase
setlocal formatoptions-=t
setlocal textwidth=79

setlocal include=\\c^\\s*use\\s\\+work\\.\\zs\\w\\+\\ze\\.
setlocal includeexpr=ft#vhdl#find_package(v:fname)

inoreabbrev <buffer> slv std_logic_vector
inoreabbrev <buffer> sl std_logic

nnoremap <buffer> <silent> <Bslash>d :<C-U>call ft#vhdl#toggle_debug()<CR>

if executable('ghdl')
  compiler ghdl
endif

let b:undo_ftplugin .=
      \ '|setl com< cms< tc< ic< scs< fo< tw< inc< inex<' .
      \ '|iuna <buffer> slv' .
      \ '|iuna <buffer> sl' .
      \ '|nun <buffer> <Bslash>d'