aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2020-09-15 09:52:02 +0900
committernsfisis <nsfisis@gmail.com>2020-09-15 09:52:06 +0900
commit055fabe9bacce8f47a30ecc67c271e8e07747faa (patch)
tree0ea3758eb8627f965df6558f030ad4093085944d
parent0f436fa5e5491a03b3369c1980d8d9245f3cae23 (diff)
downloaddotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.tar.gz
dotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.tar.zst
dotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.zip
Update .vimrc: change statusline settings
-rw-r--r--.vimrc41
1 files changed, 27 insertions, 14 deletions
diff --git a/.vimrc b/.vimrc
index 8b5b0f9..1df1a4e 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1383,39 +1383,52 @@ let g:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'active': {
\ 'left': [['mode', 'paste'], ['readonly', 'filename', 'modified']],
- \ 'right': [['linenum'], ['fileformat', 'fileencoding', 'filetype']]
+ \ 'right': [['linenum'], ['fileencoding', 'fileformat', 'filetype']]
\ },
\ 'inactive': {
\ 'left': [['readonly', 'filename', 'modified']],
- \ 'right': [['linenum'], ['fileformat', 'fileencoding', 'filetype']]
+ \ 'right': [['linenum'], ['fileencoding', 'fileformat', 'filetype']]
\ },
\ 'component_function': {
- \ 'linenum': 'LightLine_LineNum',
- \ 'fileformat': 'LightLine_FileFormat',
+ \ 'linenum': s:SNR .. 'lightline_linenum',
+ \ 'fileformat': s:SNR .. 'lightline_fileformat',
+ \ },
+ \ 'mode_map': {
+ \ 'n' : 'N',
+ \ 'i' : 'I',
+ \ 'R' : 'R',
+ \ 'v' : 'V',
+ \ 'V' : 'V-L',
+ \ "\<C-v>": 'V-B',
+ \ 'c' : 'C',
+ \ 's' : 'S',
+ \ 'S' : 'S-L',
+ \ "\<C-s>": 'S-B',
+ \ 't': 'T',
\ },
\ 'tabline': {
- \ 'left': [['tabs']],
- \ 'right': [],
+ \ 'left': [['tabs']],
+ \ 'right': [],
\ },
\ 'tab': {
- \ 'active': ['tabnum', 'filename', 'modified'],
- \ 'inactive': ['tabnum', 'filename', 'modified'],
+ \ 'active': ['tabnum', 'filename', 'modified'],
+ \ 'inactive': ['tabnum', 'filename', 'modified'],
\ },
\ }
-function! LightLine_LineNum()
+function! s:lightline_linenum()
return line('.') . '/' . line('$')
endfunction
-function! LightLine_FileFormat()
+function! s:lightline_fileformat()
if &fileformat ==# 'unix'
- return 'LF'
+ return 'lf'
elseif &fileformat ==# 'dos'
- return 'CRLF'
+ return 'crlf'
elseif &fileformat ==# 'mac'
- return 'CR'
+ return 'cr'
else
- return 'UNKNOWN'
+ return 'unknown'
endif
endfunction