diff options
| author | nsfisis <nsfisis@gmail.com> | 2020-09-15 09:52:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2020-09-15 09:52:06 +0900 |
| commit | 055fabe9bacce8f47a30ecc67c271e8e07747faa (patch) | |
| tree | 0ea3758eb8627f965df6558f030ad4093085944d | |
| parent | 0f436fa5e5491a03b3369c1980d8d9245f3cae23 (diff) | |
| download | dotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.tar.gz dotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.tar.zst dotfiles-055fabe9bacce8f47a30ecc67c271e8e07747faa.zip | |
Update .vimrc: change statusline settings
| -rw-r--r-- | .vimrc | 41 |
1 files changed, 27 insertions, 14 deletions
@@ -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 |
