Giter Site home page Giter Site logo

eleline.vim's Introduction

eleline.vim

Another elegant statusline for vim, extracted from space-vim.

Currently supported plugins:

If you're using newer vim or neovim, i.e., async API is available, eleline will probe the git branch info asynchronously instead of depending on vim-fugitive, making your vim never slower due to the statusline.

Installation

This plugin can be installed with a variety of plugin managers, e.g., vim-plug:

Plug 'liuchengxu/eleline.vim'
" Optional. If you use vim-fugitive and want a callback from it to update eleline.
" autocmd User FugitiveChanged if exists("b:eleline_branch") | unlet b:eleline_branch | endif

Don't forget to set laststatus=2 to always display statusline.

Usage

It's encouraged to fork eleline.vim to make your own custom vim statusline.

Customization

  • Ordinary font by default

    screenshot

  • Powerline font

    If the powerline font is available, i.e., let g:airline_powerline_fonts = 1 or let g:eleline_powerline_fonts = 1:

    screenshot

  • Keep it simpler

    Only show the buffer number, window number, filename and info from the plugins via let g:eleline_slim = 1:

    screenshot

    See :h CTRL-G when you need more info.

License

MIT

eleline.vim's People

Contributors

bpeebles avatar ctjhoa avatar frederick888 avatar gopherj avatar liuchengxu avatar maranimatias avatar ptn avatar ray-x avatar rockyzhang24 avatar skyblueee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eleline.vim's Issues

Statusline on inactive window is still colorful (not getting gray)

Hi Chengxu,

I stumbled across on this pretty statusline setting and I installed it just now. Now I'm reading the code and trying to configure it. Just one more thing, I found the statusline on the inactive window is the same as the active window (shown below). I know it was extracted from space-vim and I saw the screenshot of space-vim showing that the statusline on the inactive window is totally gray. Is that normal or something wrong on my end? Thank you very much.

image

How to update color schema to match my current vim theme

Hi there!

Thanks for this lightweight statusline. Clean and useful!

How could I change the colors s:colors to match my current theme (Nord) without have to fork eleline.vim. Is there anyway to extend its configuration and overwrite the current colors?

Thank you very much for the help!
Henry

在nvim和vista一起用有bug

1.打开cpp,statubar 无颜色
2.也没有当前函数
3.然后切换到:A切到hpp ,然后切回cpp,着色出现
4.如果在执行vista coc ,函数名称正常

"vista
Plug 'liuchengxu/vista.vim'
nmap :Vista!!
function! NearestMethodOrFunction() abort
return get(b:, 'vista_nearest_method_or_function', '')
endfunction
set statusline+=%{NearestMethodOrFunction()}
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()

Plug 'liuchengxu/eleline.vim'
set laststatus=2

statusline for quickfix window does not work

Hello,

When the quickfix window is opened via some command like grep, I notice the statusline is the same as the main window, i.e., the statusline in the quickfix window doesn't be set to the qf specific.

Thank you very much.

`coc#status` error

处理 function ElelineCoc[5]..coc#status 时发生错误:
第    3 行:
E712: get() 的参数必须是 List 或者 Dictionary

BREAKING CHANGE: variable 'b:coc_diagnostic_info' would be
null after diagnostics clear

neoclide/coc.nvim@8f18641

nvim退出swap文件报错

当我用nvim打开一个已经打开的文件之后提示存在swp文件,如图
2020-08-29-005447_3286x1080
然后我按q退出,就报错如下信息

Error detected while processing function <SNR>43_on_exit:
line    3:
E716: Key not present in Dictionary: stdout, 'v:val =~# "*"'))
E116: Invalid arguments for function filter
E116: Invalid arguments for function join
E15: Invalid expression: join(filter(self.stdout, 'v:val =~# "*"'))%  

2020-08-29-010235_3286x1080_scrot_000
我测试了vim8.2不会报错,但是nvim会报错,我定位到了错误点是eleline/plugin/eleline.vim第138行。请问怎么解决?

Weird "0"s when setting inccommand option

After setting set inccommand=split, I see three weird "0"s when I run :substitute. I fully checked the source code but I couldn't figure it out.

I really like this lightweight statusline configuration. Thank you for your work 👍

image

UPDATE:
I found that if I didn't use the def() function which contains printf() in it, i.e., hardcode the statueline item using string concat, e.g., changing let l:branch = s:def('ElelineGitBranch') to let l:branch = '%#ElelineGitBranch#' . ElelineGitBranch() . '%*', the issue would be solved. But the git branch information on the statusline failed to refresh.

UPDATE2:
I found I fixed it and it works well so far. I noticed that all the if conditions are written in a way of vim pipe in the same line. I changed the pipe way to the normal way, i.e., writing in multiple lines. For example: if !exists('g:LanguageClient_loaded') | return '' | endif is changed to:

if !exists('g:LanguageClient_loaded')
    return ''
endif

After changing all the pipe stuff, I found this issue disappeared. I don't know why, and I am not sure whether what I have done is correct.

Any ideas @liuchengxu ? Thank you very much.

保存文件退出 (:wq) 报错

你好,

在编辑文件,保存退出时,会报如下错误,但是文件保存没问题。
Error detected while processing function 30_on_exit:
line 3:
E716: Key not present in Dictionary: stdout, 'v:val =~ ""'))
E116: Invalid arguments for function filter
E116: Invalid arguments for function join
E15: Invalid expression: join(filter(self.stdout, 'v:val =~ "
"'))%

搜索后,发现应该是如下代码报错:
function! s:on_exit(job_id, data, _event) dict abort
if !has_key(s:jobs, a:job_id) | return | endif
if v:dying | return | endif
let l:cur_branch = join(filter(self.stdout, 'v:val =~ ""'))
if !empty(l:cur_branch)
let l:branch = substitute(l:cur_branch, '
', s:font ? " \ue0a0" : ' Git:', '')
call s:SetGitBranch(self.cwd, l:branch.' ')
else
let err = join(self.stderr)
if !empty(err) | echoerr err | endif
endif
call remove(s:jobs, a:job_id)
endfunction

对 vim script 不了解,有空可以帮忙看下吗?谢谢

最新版会导致 vim 默认文字消失

禁用 vim 除 eleline.vim 外的所有插件,vim 默认文字一闪就消失,如下:
qq20171215-162325 2x

禁用 vim 所有插件,默认文字文字正常出现:
qq20171215-162349 2x

macOS 10.13.2

请问eleline支持更换主题么?

我这个主题太暗了,neovim使用的主题是space-vim-dark,然后eleline显示很暗
image

不知道eleline能否像airline那样更换主题不

No git branch name

Hello,

The branch name is not shown. I am not using vim-fugitive.

neovim version: v0.5.0-dev+4d1fc167a, i.e., the latest master (installed via brew --HEAD)
eleline: I have already updated it to the lastest

I attached a screenshot showing the plugins I installed so far
image

Based on the README, the branch should be shown via the job feature. I don't know what's wrong on my side. Could you please do me a favor.

Thank you very much.

Error

Error detected while processing function ElelineScroll:
line 1:
E117: Unknown function: ScrollStatus
Invalid arguments for function exists
E15: Invalid expression: exists(ScrollStatus()) | return ' ' | endif

It does not show git branch name

Hi,

I have been using this plugin from last few months. Initially, it was showing me a proper git branch name in the statusline but now not sure why it is not showing for now.

statusline

I am using these git plugins 'tpope/vim-git', 'tpope/vim-fugitive', and 'mhinz/vim-signify'. I use MacVim and not nvim.

Can add tabline support and perfect eleline

Feature

是否可以添加tabline支持,从airline切换过来使用没有tabline,虽然我可以通过命令映射在buffer之间跳转,但是我更希望能在顶部看到所打开的buffer就像airline tabline一样。找了一些相关插件,过于复杂,它应该是轻量的

Problem

truecolor 下颜色偏暗了,256下橙黄很好看,我安装了spacemacs进行对比,差异还是很多,以下对比。
spacemacs
42
eleline 我的环境
1112
是否有必要进一步修改eleline,使得更加像spacemacs。如果不方便我会fork进行尝试

Integration error with GitGutter

Whenever I open a file under git version control, Vim always complains an error below:

Error detected while processing function S_gitgutter:
line 2:
E716: Key not present in Dictionary: summary

Any insight?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.