summaryrefslogtreecommitdiff
path: root/basic/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'basic/.vimrc')
-rw-r--r--basic/.vimrc96
1 files changed, 78 insertions, 18 deletions
diff --git a/basic/.vimrc b/basic/.vimrc
index a70fd4a..ed6e56a 100644
--- a/basic/.vimrc
+++ b/basic/.vimrc
@@ -1,16 +1,82 @@
-set nu
-set tabstop=4
-set softtabstop=4
-set shiftwidth=4
-set expandtab
-set autoindent
-set modeline
-set modelines=5
-set incsearch
-set exrc
-au BufNewFile,BufRead {configure.ac,*.m4} setlocal filetype=
-au BufNewFile,BufRead {*.am} setlocal noexpandtab
+" vim hardcodes background color erase even if the terminfo file does
+" not contain bce. This causes incorrect background rendering when
+" using a color theme with a background color in terminals such as
+" kitty that do not support background color erase.
+let &t_ut=''
+
+" An example for a vimrc file.
+"
+" Maintainer: The Vim Project <https://github.com/vim/vim>
+" Last Change: 2023 Aug 10
+" Former Maintainer: Bram Moolenaar <Bram@vim.org>
+"
+" To use it, copy it to
+" for Unix: ~/.vimrc
+" for Amiga: s:.vimrc
+" for MS-Windows: $VIM\_vimrc
+" for Haiku: ~/config/settings/vim/vimrc
+" for OpenVMS: sys$login:.vimrc
+
+" When started as "evim", evim.vim will already have done these settings, bail
+" out.
+if v:progname =~? "evim"
+ finish
+endif
+
+" Get the defaults that most users want.
+source $VIMRUNTIME/defaults.vim
+
+if has("vms")
+ set nobackup " do not keep a backup file, use versions instead
+else
+ set backup " keep a backup file (restore to previous version)
+ if has('persistent_undo')
+ set undofile " keep an undo file (undo changes after closing)
+ endif
+endif
+
+if &t_Co > 2 || has("gui_running")
+ " Switch on highlighting the last used search pattern.
+ set hlsearch
+endif
+
+" Put these in an autocmd group, so that we can delete them easily.
+augroup vimrcEx
+ au!
+ " For all text files set 'textwidth' to 78 characters.
+ autocmd FileType text setlocal textwidth=78
+augroup END
+
+" Add optional packages.
+"
+" The matchit plugin makes the % command work better, but it is not backwards
+" compatible.
+" The ! means the package won't be loaded right away but when plugins are
+" loaded during initialization.
+if has('syntax') && has('eval')
+ packadd! matchit
+endif
+
+" vimene
+set nu rnu ts=8 sts=4 sw=4 et ai ml mls=5 is ex bo=all
+ \ bs=indent,eol,start nofixeol udir=~/tmp bdir=~/tmp list lcs=tab:\ \ ,nbsp:~
+unlet c_comment_strings
+colo sorbet
+au BufNewFile,BufRead {.vimrc,*.vim,*.m4} setl sts=2 sw=2
+au BufNewFile,BufRead {configure.ac,*.m4} setl ft=
+au BufNewFile,BufRead {Makefile,*.am} setl ts=4 sts=0 sw=0 noet
+au BufNewFile,BufRead {*.bc} setl ts=2 sts=0 sw=0 noet
+au BufNewFile,BufRead {*.ac} setl sts=2 sw=2 ft=m4
+au BufNewFile,BufRead {/etc/environment} setl ft=sh
+au BufNewFile,BufRead {*.sh} setl sts=2 sw=2
+
+let $BASH_ENV = "~/.vim_bash_aliases"
+
+filet plugin on
+se ofu=syntaxcomplete#Complete
+
+" kitty
" Mouse support
set mouse=a
set ttymouse=sgr
@@ -52,9 +118,3 @@ execute "set <FocusLost>=\<Esc>[O"
" Window title
let &t_ST = "\e[22;2t"
let &t_RT = "\e[23;2t"
-
-" vim hardcodes background color erase even if the terminfo file does
-" not contain bce. This causes incorrect background rendering when
-" using a color theme with a background color in terminals such as
-" kitty that do not support background color erase.
-let &t_ut=''