2024-03-01 16:28:35 -05:00
|
|
|
"============================================================="
|
|
|
|
" "
|
|
|
|
" Darkcloud Neovim Config: settings to load after "
|
|
|
|
" "
|
|
|
|
" By: Kevin MacMartin (prurigro@gmail.com) "
|
|
|
|
" Website: https://github.com/prurigro/darkcloud-nvimconfig "
|
|
|
|
" "
|
|
|
|
" License: MIT "
|
|
|
|
" "
|
|
|
|
"============================================================="
|
2014-06-04 03:18:29 -04:00
|
|
|
|
|
|
|
"load the system version of matchit if another hasn't already been
|
|
|
|
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
|
|
|
runtime! macros/matchit.vim
|
|
|
|
endif
|
|
|
|
|
|
|
|
"enable omnicompletion for any filetype without that has syntax highlighting
|
2018-03-13 15:37:19 -04:00
|
|
|
if exists("+omnifunc")
|
2014-06-04 03:18:29 -04:00
|
|
|
autocmd VimEnter,Filetype * if &omnifunc == ""|setlocal omnifunc=syntaxcomplete#Complete|endif
|
|
|
|
endif
|
|
|
|
|
2015-02-27 11:21:28 -05:00
|
|
|
"prevent warnings when changing read-only files
|
|
|
|
autocmd FileChangedRO * nested set noreadonly
|
|
|
|
|
2014-06-04 03:18:29 -04:00
|
|
|
"FILETPE AND SYNTAX: {{{
|
2016-11-28 14:12:12 -05:00
|
|
|
"enable more accurate syntax synchronization
|
|
|
|
autocmd BufEnter * :syntax sync fromstart
|
|
|
|
|
2024-03-01 21:59:23 -05:00
|
|
|
"disable automatic line breaks
|
2024-03-11 12:15:20 -04:00
|
|
|
set textwidth=0
|
2024-03-01 21:59:23 -05:00
|
|
|
|
2024-03-06 16:28:24 -05:00
|
|
|
"set filetypes for various file extensions
|
2014-08-11 00:58:56 -04:00
|
|
|
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setlocal ft=aspnet
|
|
|
|
autocmd BufNewFile,BufRead *.gradle setlocal ft=groovy
|
2024-02-23 16:41:49 -05:00
|
|
|
autocmd BufNewFile,BufRead *eslintrc setlocal ft=json
|
2019-05-24 00:31:02 -04:00
|
|
|
autocmd BufNewFile,BufRead *.muttrc setlocal ft=muttrc
|
|
|
|
autocmd BufNewFile,BufRead *.neomuttrc setlocal ft=neomuttrc
|
2015-02-26 21:40:56 -05:00
|
|
|
autocmd BufNewFile,BufRead *pacman.conf setlocal ft=conf
|
2014-07-21 02:36:50 -04:00
|
|
|
|
2014-07-16 06:46:17 -04:00
|
|
|
"filtype specific settings
|
2016-11-28 14:12:12 -05:00
|
|
|
autocmd BufEnter,FileType sh setlocal iskeyword-=.
|
2024-03-11 12:15:20 -04:00
|
|
|
autocmd Filetype markdown,text,gitcommit,mail setlocal nonumber spell tabstop=2 shiftwidth=2 "word processing defaults
|
|
|
|
autocmd Filetype text,gitcommit,mail setlocal wrap nolist textwidth=80 linebreak breakat&vim breakat-=* breakat-=. breakat-=/ breakat-=? breakat-=, breakat-=: breakat-=; breakat-=! "configure text wrapping for applicable filetypes
|
2024-02-23 16:36:55 -05:00
|
|
|
autocmd FileType tmux setlocal commentstring=#\ %s "set the comment string to #
|
2020-10-25 20:56:01 -04:00
|
|
|
autocmd FileType scss setlocal iskeyword+=$
|
2024-03-07 20:56:29 -05:00
|
|
|
autocmd Filetype markdown setlocal iskeyword+=-
|
2023-04-05 21:56:43 -04:00
|
|
|
autocmd FileType javascript setlocal iskeyword+=- iskeyword+=.
|
2014-11-02 18:19:37 -05:00
|
|
|
|
|
|
|
"special side/bottom-bar settings to apply when opened
|
2022-04-15 00:13:36 -04:00
|
|
|
autocmd BufEnter,FileType qf,help* setlocal nowrap nocursorcolumn "disable text wrapping and the vertical cursor line
|
|
|
|
autocmd BufEnter,FileType qf setlocal scrolloff=0 "don't scroll when clicking near the top or bottom of the list
|
2014-11-02 18:19:37 -05:00
|
|
|
autocmd BufEnter,FileType help* setlocal nocursorline "remove the horizontal cursor line
|
|
|
|
|
2014-12-01 08:46:34 -05:00
|
|
|
"load in an 80 char vertical split if the window is wider than 140 characters
|
|
|
|
autocmd BufEnter,FileType help* if (winwidth(0) >= 110)|wincmd L|vertical resize 80|endif
|
2014-06-04 03:18:29 -04:00
|
|
|
|
|
|
|
"settings for buffers in diff mode
|
|
|
|
autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif
|
|
|
|
|
2024-03-01 16:28:35 -05:00
|
|
|
"disable the whitespace plugin for mail
|
|
|
|
autocmd BufEnter,FileType mail hi ExtraWhitespace ctermbg=NONE guibg=NONE
|
2014-06-04 03:18:29 -04:00
|
|
|
"}}}
|