search

Home  >  Q&A  >  body text

Settings for displaying content in the lower part of the vim page

In this vim, how are the full path of the file displayed below and the status of the operation being set?

Are there any other cooler settings? I saw that some experts can directly operate the terminal to open files and the like. What do you press?

習慣沉默習慣沉默2773 days ago781

reply all(4)I'll reply

  • 迷茫

    迷茫2017-05-16 16:43:20

    The one below is the result of statusline and showmode option settings.

    It is recommended to execute vimtutor first to learn the basics of Vim, then execute :help in vim and read the user manual, and finally try various plug-ins.

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 16:43:20

    I use powerline
    It looks like this:

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 16:43:20

    Same as above, use powline

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 16:43:20

    if has('statusline')
        set laststatus=2   " make statusline always shown
    
        set statusline=%<%f\:                    " Filename
        set statusline+=%-5.3n\                 " buffer number
        set statusline+=%w%h%m%r                 " Options
        set statusline+=%{fugitive#statusline()} " Git Hotness
        set statusline+=\ [%{&ff}/%Y]            " Filetype
        set statusline+=\ [%{getcwd()}]          " Current dir
        set statusline+=%=%-14.(%l,%c%V%)\ %p%%  " Right aligned file nav info
    endif
    

    Among them set statusline+=%{fugitive#statusline()} " Git Hotness see the plug-in https://github.com/tpope/vim-fugitive

    reply
    0
  • Cancelreply