Skip to content

Instantly share code, notes, and snippets.

@nhan2nguyen
Forked from meskarune/vimrc
Created February 17, 2021 02:34
Show Gist options
  • Select an option

  • Save nhan2nguyen/3e9caec6e8d951fe688715fd555e94b7 to your computer and use it in GitHub Desktop.

Select an option

Save nhan2nguyen/3e9caec6e8d951fe688715fd555e94b7 to your computer and use it in GitHub Desktop.

Revisions

  1. @meskarune meskarune revised this gist Nov 30, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,7 @@ let g:currentmode={
    \}

    set laststatus=2
    set noshowmode
    set statusline=
    set statusline+=%0*\ %n\ " Buffer number
    set statusline+=%1*\ %<%F%m%r%h%w\ " File path, modified, readonly, helpfile, preview
  2. @meskarune meskarune revised this gist Nov 17, 2017. 1 changed file with 44 additions and 12 deletions.
    56 changes: 44 additions & 12 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,50 @@
    " status bar colors
    au InsertEnter * hi statusline guifg=black guibg=#597BC5 ctermfg=black ctermbg=DarkBlue
    au InsertLeave * hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236
    hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236
    au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta
    au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
    hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan

    " Status line
    " default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)

    " Status Line Custom
    let g:currentmode={
    \ 'n' : 'Normal',
    \ 'no' : 'Normal·Operator Pending',
    \ 'v' : 'Visual',
    \ 'V' : 'V·Line',
    \ '^V' : 'V·Block',
    \ 's' : 'Select',
    \ 'S' : 'S·Line',
    \ '^S' : 'S·Block',
    \ 'i' : 'Insert',
    \ 'R' : 'Replace',
    \ 'Rv' : 'V·Replace',
    \ 'c' : 'Command',
    \ 'cv' : 'Vim Ex',
    \ 'ce' : 'Ex',
    \ 'r' : 'Prompt',
    \ 'rm' : 'More',
    \ 'r?' : 'Confirm',
    \ '!' : 'Shell',
    \ 't' : 'Terminal'
    \}

    set laststatus=2
    set statusline=
    set statusline+=\ %n\ "Buffer number
    set statusline+=\ %F%m%r%h%w\ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %Y\ "FileType
    set statusline+=\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
    set statusline+=\ %{(&bomb?\",BOM\":\"\")} "Encoding2
    set statusline+=(%{&ff}) "FileFormat (dos/unix..)
    set statusline+=%= "right side
    set statusline+=col:\ %02v "Colomn number
    set statusline+=\ \ ln:\ %02l/%L\ (%3p%%) "Line number / total lines, percentage of document
    set statusline+=%0*\ %n\ " Buffer number
    set statusline+=%1*\ %<%F%m%r%h%w\ " File path, modified, readonly, helpfile, preview
    set statusline+=%3* " Separator
    set statusline+=%2*\ %Y\ " FileType
    set statusline+=%3* " Separator
    set statusline+=%2*\ %{''.(&fenc!=''?&fenc:&enc).''} " Encoding
    set statusline+=\ (%{&ff}) " FileFormat (dos/unix..)
    set statusline+=%= " Right Side
    set statusline+=%2*\ col:\ %02v\ " Colomn number
    set statusline+=%3* " Separator
    set statusline+=%1*\ ln:\ %02l/%L\ (%3p%%)\ " Line number / total lines, percentage of document
    set statusline+=%0*\ %{toupper(g:currentmode[mode()])}\ " The current mode

    hi User1 ctermfg=007 ctermbg=239 guibg=#4e4e4e guifg=#adadad
    hi User2 ctermfg=007 ctermbg=236 guibg=#303030 guifg=#adadad
    hi User3 ctermfg=236 ctermbg=236 guibg=#303030 guifg=#303030
    hi User4 ctermfg=239 ctermbg=239 guibg=#4e4e4e guifg=#4e4e4e
  3. @meskarune meskarune revised this gist Nov 15, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vimrc
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236

    set statusline=
    set statusline+=\ %n\ "Buffer number
    set statusline+=\ %F%m%r%h%w\ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %F%m%r%h%w\ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %Y\ "FileType
    set statusline+=\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
    set statusline+=\ %{(&bomb?\",BOM\":\"\")} "Encoding2
  4. @meskarune meskarune revised this gist Nov 15, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vimrc
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236

    set statusline=
    set statusline+=\ %n\ "Buffer number
    set statusline+=\ %F/%t%m%r%h%w\ │ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %F%m%r%h%w\ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %Y\ "FileType
    set statusline+=\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
    set statusline+=\ %{(&bomb?\",BOM\":\"\")} "Encoding2
  5. @meskarune meskarune created this gist Nov 15, 2017.
    18 changes: 18 additions & 0 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    " status bar colors
    au InsertEnter * hi statusline guifg=black guibg=#597BC5 ctermfg=black ctermbg=DarkBlue
    au InsertLeave * hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236
    hi statusline guifg=LightGrey guibg=#303030 ctermfg=LightGrey ctermbg=236

    " Status line
    " default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)

    set statusline=
    set statusline+=\ %n\ "Buffer number
    set statusline+=\ %F/%t%m%r%h%w\ │ "Path/file, modified, readonly, helpfile, preview
    set statusline+=\ %Y\ "FileType
    set statusline+=\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding
    set statusline+=\ %{(&bomb?\",BOM\":\"\")} "Encoding2
    set statusline+=(%{&ff}) "FileFormat (dos/unix..)
    set statusline+=%= "right side
    set statusline+=col:\ %02v "Colomn number
    set statusline+=\ \ ln:\ %02l/%L\ (%3p%%) "Line number / total lines, percentage of document