summaryrefslogtreecommitdiff
path: root/src/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'src/.vimrc')
-rwxr-xr-xsrc/.vimrc71
1 files changed, 68 insertions, 3 deletions
diff --git a/src/.vimrc b/src/.vimrc
index 1448eef..b8d4422 100755
--- a/src/.vimrc
+++ b/src/.vimrc
@@ -1,6 +1,6 @@
syntax on
-set background=dark
-colorscheme cyberpunk
+
+colorscheme ice
" Your usual config below
set number
@@ -13,12 +13,77 @@ set smartindent
set scrolloff=999
set mouse=a
+""""""""""""""""""""""""""""""""""""""""""
+" Statubar
+
+function! VisualModeLineCount()
+ if mode() =~# 'v'
+ return '['.(line("'>") - line("'<") + 1).' lines selected]'
+ endif
+ return ''
+endfunction
+
+function! ModifiedFlag()
+ if &modified
+ return '[Modified]' " Your custom text
+ endif
+ return '' " Empty if not modified
+endfunction
+
+function! ReadOnlyFlag()
+ if &readonly
+ return '[Read-only]' " Your custom text
+ endif
+ return '' " Empty if not modified
+endfunction
+
+" Full-width statusline
+set laststatus=2
+set statusline=
+
+" LEFT Side
+set statusline=
+set statusline+=%f " File name
+set statusline+=\ [%l:%c] " Line and column
+set statusline+=\ [%L/%p%%] " Total lines and percent
+set statusline+=%{VisualModeLineCount()} " Selected lines in visual mode
+set statusline+=%{ModifiedFlag()} " Custom modified flag
+
+" CENTER filler (optional)
+set statusline+=%=
+
+" RIGHT side
+set statusline+=\ [%y] " Filetype
+set statusline+=%{ReadOnlyFlag()}
+
+""""""""""""""""""""""""""""""""""""""""""
+
+" Status bar transparent
+hi StatusLine ctermbg=0 cterm=NONE
+
+" Cursor can rest beyond the last character
+set virtualedit=onemore
+
+" Highlight
+set hlsearch
+
+" Disable expandtab for make files
+autocmd FileType make setlocal noexpandtab
+
+" System clipboard
+if has("clipboard")
+ set clipboard=unnamedplus
+endif
+
" F2: absolute numbers only
nnoremap <F2> :set number!<CR>
" F4: absolute numbers only
nnoremap <F4> :set relativenumber!<CR>
+" Search highlight
+nnoremap <F5> :nohlsearch<CR>
+
if &term =~ 'tmux\|xterm\|konsole'
" Map HOME key to move to beginning of line in normal mode
noremap <Esc>[1~ 0
@@ -26,7 +91,7 @@ if &term =~ 'tmux\|xterm\|konsole'
noremap <Esc>OH 0
endif
-
+" Colors
if has('termguicolors')
set termguicolors
endif