aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2025-06-13 09:12:30 +0200
committerGibheer <gibheer+git@zero-knowledge.org>2025-06-13 09:12:30 +0200
commit0c06999dce017e857385310a35c9f5c1876e4732 (patch)
tree792dbd26d4f8dbef6f954a8a19c43e7629dcbd02 /vim/vimrc
initial configs
This is the current bare bones config only for tmux and vim. zsh will probably follow later.
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc68
1 files changed, 68 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
new file mode 100644
index 0000000..c9dfd12
--- /dev/null
+++ b/vim/vimrc
@@ -0,0 +1,68 @@
+" start pathogen to manage the plugins
+" runtime bundle/vim-pathogen/autoload/pathogen.vim
+" execute pathogen#infect()
+
+" global settings
+set nocompatible
+syntax enable
+set encoding=utf-8
+set showcmd " display incomplete commands
+filetype plugin indent on " load file type plugins + indentation
+colorscheme mustang " load the mustang colorscheme
+set belloff=all " disable bell completely
+"set number " activate line numbers
+" switch between relative and absolute line numbers
+set number
+set relativenumber
+autocmd InsertEnter * :set norelativenumber
+autocmd InsertLeave * :set relativenumber
+set t_Co=256 " set 256 colors as everything supports it
+set scrolloff=9999 " show as much context as possible
+set history=500 " keep 5000 lines of commands
+
+"" Whitespace
+set wrap " wrap lines
+set tabstop=2 shiftwidth=2 " a tab is two spaces
+set expandtab " use spaces, not tabs
+set backspace=indent,eol,start " backspace through everything in insert mode
+
+"" Searching
+set hlsearch " highlight matches
+set incsearch " incremental searching
+set ignorecase " searches are case insensitive...
+set smartcase " ... unless they contain at least one capital letter
+set cursorline " highlight the line of the cursor
+
+if version >=703
+ set colorcolumn=80 " mark column 80 as a limit
+endif
+
+"" command remappings
+" clear the search buffer when hitting return
+:nnoremap <CR> :nohlsearch<cr>
+
+" easier navigation between split windows
+nnoremap <c-j> <c-w>j
+nnoremap <c-k> <c-w>k
+nnoremap <c-h> <c-w>h
+nnoremap <c-l> <c-w>l
+
+"" file settings
+" set backupdir=~/.vim/_backup " where to put backup files.
+" set directory=~/.vim/_temp " where to put swap files.
+
+"" module settings
+if has("autocmd")
+ " Remember last location in file, but not for commit messages.
+ " see :help last-position-jump
+ au BufReadPost * if &filetype !~ '^git\c' && line("'\"") > 0 && line("'\"") <= line("$")
+ \| exe "normal! g`\"" | endif
+endif
+
+"" ignore some directories in ctrlp
+let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
+"" open ctrlp selection in new tab by default
+let g:ctrlp_prompt_mappings = {
+ \ 'AcceptSelection("e")': ['<c-t>'],
+ \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
+ \ }