vim: misc, including some filetype changes

New Elixir maps
Move syntax stuff to EOF
Set 'nasm' for assembler files.
This commit is contained in:
2020-11-27 12:40:22 +00:00
parent 4adcf08cc0
commit f3f4fd8db8

34
vimrc
View File

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