From 0c06999dce017e857385310a35c9f5c1876e4732 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Fri, 13 Jun 2025 09:12:30 +0200 Subject: initial configs This is the current bare bones config only for tmux and vim. zsh will probably follow later. --- vim/vimrc | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 vim/vimrc (limited to 'vim/vimrc') 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 :nohlsearch + +" easier navigation between split windows +nnoremap j +nnoremap k +nnoremap h +nnoremap 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")': [''], + \ 'AcceptSelection("t")': ['', '<2-LeftMouse>'], + \ } -- cgit v1.2.3-70-g09d2