1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(vim): ignorecase, toggle background

This commit is contained in:
Kierán Meinhardt
2020-05-19 14:59:25 +02:00
parent ba03c19a74
commit b93c4e9c9c

View File

@@ -40,7 +40,7 @@ filetype plugin indent on
set notitle
set nospell
set nocompatible
set smartcase
set smartcase ignorecase " you need these two
set shiftwidth=2 tabstop=2 expandtab
set laststatus=1
set number
@@ -100,6 +100,18 @@ function! s:DiffWithSaved()
endfunction
command! DiffSaved call s:DiffWithSaved()
" BACKGROUND COLOR TOGGLE
function! s:toggle_background()
if &background ==# "light"
set background=dark
elseif &background ==# "dark"
set background=light
endif
endfunction
command! ToggleBackground call s:toggle_background()
inoremap <F12> <C-O>:ToggleBackground<CR>
nnoremap <F12> :ToggleBackground<CR>
if has("autocmd")
autocmd bufnewfile,bufread *.4th set filetype=forth
autocmd bufnewfile,bufread *.asm set filetype=nasm
@@ -126,6 +138,7 @@ if has("autocmd")
autocmd filetype make setlocal noexpandtab
autocmd filetype html packadd emmet-vim
autocmd filetype gitcommit setlocal spell
autocmd filetype mail setlocal spell
autocmd bufreadpost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
@@ -134,8 +147,6 @@ if has("autocmd")
" autocmd bufwritepre * :call <SID>StripTrailingWhitespaces()
autocmd bufwinenter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
autocmd bufwrite *.elm set nofoldenable
autocmd VimEnter * UpdateRemotePlugins
endif