Open CodeMonkeyKevin opened 7 years ago
@CodeMonkeyKevin Does it still an issue?
I use vim-airline
with Fira Code font for a few years by now and have no such issue.
To add to this issue, I can't get the buffer tab line to show in macvim, though it does appear in vim in iTerm2. I am not using vim-airline
, just pretty much out-of-the-box macvim and pip3 powerline with the recommended settings from the powerline documentation section on installation... any ideas what could be wrong with my setup?
My best guess is a wide font symbol it uses to render status (#572) Other applications also draw such symbols incorrectly (including Apple Terminal)
My proposition to you is to change this symbol with something else to have better experience.
.
My problem isn't character overlapping, the buffer tab line does not appear at all in my case (see images).
MacVim with 2 open buffers (shows the powerline in the bottom and the output of :ls
, but at the top is only MacVim's tab bar instead of powerline's buffer/tabline):
Vim (in iTerm2) with 2 open buffers:
What I want is for MacVim to show the powerline buffer/tabline at the top, but I can't figure out why it's not there.
Are you sure that there's no check for GUI/MacVim in your version of plugin that prevents it for some reason?
vim-ariline with tabline (it's embedded) enabled looks like this
Plug 'vim-airline/vim-airline'
let g:airline_powerline_fonts=1
let g:airline#extensions#tabline#enabled = 1
Are you sure that there's no check for GUI/MacVim in your version of plugin that prevents it for some reason?
I am afraid it could be something as stupid as this, but I can't find any switch... I'm just surprised it works in vim in iTerm but not in MacVim's GUI (I didn't know powerline cared about the process hosting vim).
Is vim-airline an alternative to powerline? Will it conflict with powerline? Because I am a (recent) zsh adoptee but I would like to keep powerline :)
Yes, this is a full rewrite as I read, it's very configurable. It'll probably conflict with as it does the similar function. You can try it by creating other configuration and then decide
you can try to lookup for gui_running
, gui_macvim
or if plugin checks any vim capabilities by has()
Running :echom has("gui_running")
and :echom has("gui_macvim")
from inside macvim's gui both print 1 in the status line, but I'm not sure if I'm doing it quite right. BTW, I've also opened an issue over at powerline, in case the issue is really on their side...
Could you share here which plugin repos do you use?
Under ~/.vim/bundle/
, I have: tcomment_vim, vim-sensible, latex-suite-aka-vim-latex and pathogen. My entire .vimrc
:
filetype plugin indent on
" turn on line numbers
set nu
" turn on relative line numbering
set relativenumber
set ignorecase
set smartcase
syntax on
set wildmenu
set wildignore+=*.class
set wildignore+=node_modules/*,bower_components/*
set wildmode=longest:list,full
" enable showcmd corner (bottom right)
set showcmd
" gb to show the buffer list and open :b
nnoremap gb :ls<CR>:b<Space>
let g:tex_flavor='latex'
" make netrw open new files in a new tab instead of the current buffer
" let g:netrw_browse_split = 3
" auto start NERDTree
" autocmd vimenter * NERDTree
execute pathogen#infect()
call pathogen#helptags()
" wrap long lines, and don't break in the middle of a word
set linebreak
" load powerline
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del(powerline_setup)
set laststatus=2 " Always display the statusline in all windows
set showtabline=2 " Always display the tabline, even if there is only one tab
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)
set guifont=MesloLGSForPowerline-Regular:h11
set background=dark
" colorscheme solarized
set path=.,,**
" highlight search results
" set hlsearch
" highlight the current cursor line
set cursorline
" remap spacebar to leader
map <Space> <Leader>
" some suggested useful commands:
" save the file with <leader>s
nnoremap <leader>s :w<cr>
" move between windows with ctrl+movement rather than ctrl-w + movement
" THESE DONT WORK WITH VIM-LATEX
" noremap <C-l> <C-w>l
" noremap <C-h> <C-w>h
" noremap <C-j> <C-w>j
" noremap <C-k> <C-w>k
" apply macro in q with Q instead of @Q
nnoremap Q @q
vnoremap Q :norm @q<cr>
" clone current paragraph
noremap cp yap<S-}>p
" edit vimrc quickly
map <leader>v :sp ~/.vimrc<cr>
" mapping for Tagbar
" nmap <F8> :TagbarToggle<CR>
As you can tell from lingering (currently commented out) settings, I tried ctrlp
, nerdtree
and tagbar
, but since I wasn't really using them, I removed them.
@eirnym I've made the switch to airline (I was trying neovim and found that powerline is not compatible - and I was actually sold by "100% vimscript; no python needed." 😁), and I wanted to let you know that I had to add let g:airline#extensions#tabline#enabled = 1
to my vimrc for everything to work in MacVim. Without it, the regular "OS style" tab bar is shown.
I think the issue here is just whether guioptions
has e
or not (see help go-e
and help tabline
). Seems like maybe g:airline#extensions#tabline#enabled
just automatically do set guioptions-=e
for you? If you want to use Powerline, I think you can manually do that and it should work.
Basically, Vim has two types of tabs (GUI vs terminal). The terminal tabs are more flexible and allows for different customization. By default MacVim GUI uses the GUI tabs.
If no one has more issues on this I will close this issue as doesn't seem like the original issue is there anymore.
@ychin Can confirm that guioptions is the actual setting I was looking for. I had no idea this was a thing, thanks for showing me. No need to hold off on closing the issue on my behalf, my issues have been resolved :)
I'm getting this strange char display issue on the Powerline and Buffer Tab line (please see attached screenshot. Its not my config or font as I deleted my init.vim and still had this issue. Issue only occurs in MacVim and not vim (in iTerm2).