aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2023-10-08 12:16:11 +0200
committerOxbian <got.dacs@slmail.me>2023-10-08 12:16:11 +0200
commit1d4561690b8a267cd0ebf909a37f4ed320433a53 (patch)
tree7335d5dbb80854d38613369688ebdc4bc640f13b
parent36cad3b53b2878fc6e1cbdf4f942d76988e04750 (diff)
downloadvimrc-1d4561690b8a267cd0ebf909a37f4ed320433a53.tar.gz
vimrc-1d4561690b8a267cd0ebf909a37f4ed320433a53.zip
Removing vim-airline and using custom statusline
-rw-r--r--README.md5
-rw-r--r--vim/options.vim7
-rw-r--r--vim/plugins.vim48
3 files changed, 36 insertions, 24 deletions
diff --git a/README.md b/README.md
index 919fed9..8c4dc09 100644
--- a/README.md
+++ b/README.md
@@ -22,12 +22,10 @@ This config has just the necessary plugins installed:
### Themes
- [OneDark](https://github.com/joshdick/onedark.vim) onedark theme.
-- [Vim Airline](https://github.com/vim-airline/vim-airline) Vim statusline.
### Graphics utilities
- [Vim which key](https://github.com/liuchengxu/vim-which-key) show leader keybinds in a GUI.
-- [Vim devicons](https://github.com/ryanoasis/vim-devicons) language icons for vim.
- [Vim gitgutter](https://github.com/airblade/vim-gitgutter) to see diff between files with git.
### LSP
@@ -88,6 +86,9 @@ More help at `:help spell`
For help, use `:help netrw`.
Keybinds:
- `Ctrl+f` open the treeview buffer at the left,
+- `gh` show/hide hidden files,
+- `gp` change permission of local file
+- `I` show netrw banner,
### Vim Gutter
diff --git a/vim/options.vim b/vim/options.vim
index a115782..7ffd2a9 100644
--- a/vim/options.vim
+++ b/vim/options.vim
@@ -12,7 +12,6 @@ set number " Show line number
set relativenumber " Show relative line number
set cursorline " Select the current line
set showmatch " Show matching brackets when overred
-set laststatus=2 " Fix for tabline
set noshowmode " Disable the -- INSERTION -- default comment
set so=7 " Set 7 lines to the cursor - when moving vertically
@@ -32,11 +31,7 @@ set preserveindent " Preserve indent style
set autowrite " Automatically write the file on certain actions
set autoread " Automatically read extern changes on the file
-" Netrw (filetree built-in vim)
-let g:netrw_keepdir = 0 " Reload buffer usefull when moving or removing file
-let g:netrw_winsize = 10 " Size of filetree buffer
-let g:netrw_banner = 0 " Removing netrw banner
-let g:netrw_localcopydircmd = 'cp -r' " Changing copy command to add recursive copy
+
" System
if has('unnamedplus') " ALlow OS & vim clipboard sync
diff --git a/vim/plugins.vim b/vim/plugins.vim
index 1fbe15b..aa9754a 100644
--- a/vim/plugins.vim
+++ b/vim/plugins.vim
@@ -16,8 +16,6 @@ call plug#begin('~/.vim/plugged')
" UI & Themes
Plug 'joshdick/onedark.vim' " Onedark themes for vim
-Plug 'vim-airline/vim-airline' " Vim statusline
-Plug 'ryanoasis/vim-devicons' " Devicons
Plug 'liuchengxu/vim-which-key' " Show leader mapping cheatsheet
" Git integration
@@ -42,21 +40,39 @@ filetype plugin indent on " Allow filetype detection, plugins, indentation
"""""""""""""""""""""""""
" Configuration
"""""""""""""""""""""""""
-" VIM airline
-let g:airline_theme='onedark' " Status line color & configuration
+" Netrw (filetree built-in vim)
+let g:netrw_keepdir = 0 " Reload buffer usefull when moving or removing file
+let g:netrw_winsize = 10 " Size of filetree buffer
+let g:netrw_banner = 0 " Removing netrw banner
+let g:netrw_localcopydircmd = 'cp -r' " Changing copy command to add recursive copy
+
+" Statusline
+let g:currentmode={
+ \ 'n' : 'NORMAL ',
+ \ 'v' : 'VISUAL ',
+ \ 'V' : 'V·Line ',
+ \ "\<C-V>" : 'V·Block ',
+ \ 'i' : 'INSERT ',
+ \ 'R' : 'R ',
+ \ 'Rv' : 'V·Replace ',
+ \ 'c' : 'Command ',
+ \}
+set laststatus=2
+set statusline=
+" VIM Mode
+set statusline+=\ %{toupper(g:currentmode[mode()])}%{&spell?'[SPELL]':''}\|
+" File (path, modified, readonly ? )
+set statusline+=%h\ %F
+set statusline+=%{&modified?'\ [+]':''}
+set statusline+=%{&readonly?'\ ':''}
+" Filetype
+set statusline+=%=%y
+set statusline+=\ \|\ %{&fileencoding?&fileencoding:&encoding}
+set statusline+=\ \|\ [%{&fileformat}\]
+" Line count and percentage
+set statusline+=\ \|\ %l:%c
+set statusline+=\ [%p%%]\
-if !exists('g:airline_symbols')
- let g:airline_symbols = {}
-endif
-let g:airline_symbols.colnr = ' ㏇:'
-let g:airline_symbols.crypt = '🔒'
-let g:airline_symbols.linenr = ' ¶'
-let g:airline_symbols.maxlinenr = ''
-let g:airline_symbols.branch = '⎇'
-let g:airline_symbols.paste = 'ρ'
-let g:airline_symbols.spell = 'Ꞩ'
-let g:airline_symbols.notexists = 'Ɇ'
-let g:airline_symbols.whitespace = ' Ξ'
" VIM lsp
let g:lsp_diagnostics_echo_cursor = 1
ArKa projects. All rights to me, and your next child right arm.