vim: misc, including some filetype changes
New Elixir maps Move syntax stuff to EOF Set 'nasm' for assembler files.
This commit is contained in:
34
vimrc
34
vimrc
@@ -128,8 +128,6 @@ set complete=.,b,u,]
|
||||
|
||||
set wildignore+=deps/*,node_modules/*,*.sw?
|
||||
|
||||
syntax on
|
||||
|
||||
" Turn off the beeping ('cause it's annoying)
|
||||
set noerrorbells
|
||||
set visualbell
|
||||
@@ -164,8 +162,8 @@ map ,t3 :echo TabSize(3)<CR>
|
||||
map ,t4 :echo TabSize(4)<CR>
|
||||
map ,t8 :echo TabSize(8)<CR>
|
||||
|
||||
" treat C preprocessed assembler files as C
|
||||
augroup filetype
|
||||
" Explicitly set certain filetypes.
|
||||
augroup filetypedetect
|
||||
au!
|
||||
au BufRead,BufNewFile *.S set filetype=c
|
||||
au bufRead,BufNewFile *.cc set filetype=cpp
|
||||
@@ -173,6 +171,7 @@ augroup filetype
|
||||
au bufRead,BufNewFile *.inc set filetype=make
|
||||
au BufRead,BufNewFile *.eex set filetype=html
|
||||
au BufRead,BufNewFile *.bss set filetype=vb
|
||||
au BufRead,BufNewFile *.asm set filetype=nasm
|
||||
augroup END
|
||||
|
||||
augroup java
|
||||
@@ -185,13 +184,11 @@ augroup cppprog
|
||||
au BufRead,BufNewFile *.h set cindent
|
||||
au BufRead,BufNewFile *.cc set cindent
|
||||
au BufRead,BufNewFile *.cpp set cindent
|
||||
call TabSize(4)
|
||||
augroup END
|
||||
|
||||
augroup cprog
|
||||
au!
|
||||
au BufRead,BufNewFile *.[ch] set cindent
|
||||
call TabSize(4)
|
||||
augroup END
|
||||
|
||||
augroup xml
|
||||
@@ -205,11 +202,11 @@ augroup END
|
||||
" Apply the muttrc colouring to mutt setup files:
|
||||
au BufNewFile,BufRead .mutt.* set ft=muttrc
|
||||
|
||||
" augroup filetype elixir
|
||||
" autocmd!
|
||||
" autocmd BufRead * imap ii IO.inspect(
|
||||
" autocmd BufRead * imap ip IO.puts(
|
||||
" augroup END
|
||||
augroup elixir
|
||||
autocmd!
|
||||
autocmd BufRead,BufNewFile *.ex,*.exs inoremap ii IO.inspect(
|
||||
autocmd BufRead,BufNewFile *.ex,*.exs inoremap ip IO.puts(
|
||||
augroup END
|
||||
|
||||
augroup filetype vue
|
||||
autocmd!
|
||||
@@ -239,6 +236,7 @@ augroup END
|
||||
|
||||
" Automatic typo fixing
|
||||
iab compomemt component
|
||||
iab seahores seahorse
|
||||
|
||||
" Disable the command 'K' (keyword lookup)
|
||||
" map K <NUL>
|
||||
@@ -434,7 +432,6 @@ if has("cscope")
|
||||
map ,sc :cs find c
|
||||
map ,sa :cs find t
|
||||
endif
|
||||
filetype plugin indent on
|
||||
|
||||
" Avoids printing anything by accident...
|
||||
set printexpr=PrintFile(v:fname_in)
|
||||
@@ -628,5 +625,18 @@ else
|
||||
echom "Don't know how to open on this platform."
|
||||
endif
|
||||
|
||||
|
||||
let g:startify_session_before_save = [
|
||||
\ 'echo "Cleaning up before saving.."',
|
||||
\ 'silent! NERDTreeTabsClose'
|
||||
\ ]
|
||||
|
||||
match Todo /\s\+$/
|
||||
|
||||
" Markdown folding
|
||||
let g:markdown_fold_style = 'nested'
|
||||
|
||||
syntax on
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype plugin indent on
|
||||
|
||||
Reference in New Issue
Block a user