Coder Social home page Coder Social logo

Comments (14)

itchyny avatar itchyny commented on July 30, 2024 1

How about the following config?

      \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
      \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }

Note: use the double quotations.

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Can you try powerline (https://github.com/Lokaltog/powerline) and check whether it works?

from lightline.vim.

paullemmens avatar paullemmens commented on July 30, 2024

Unfortunately, I did not understand well how to install Powerline. In any case after copying around a few files, gvim complained that it was not compiled with (the proper) python support. I use a precompiled windows binary of version 7.4 that was released a month ago.

Would it help if I sent my full .vimrc so you can check for conflicting settings or something?

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

What about vim-airline (https://github.com/bling/vim-airline)?
It is not based on python so you can install it.
I want you to judge if this issue is due to a bug of this plugin or a bug of GVim for Windows.
Powerline has lots of users and is a matured product so it's a good plugin to compare.
vim-airline is a new plugin so both plugins (vim-airline and lightline.vim) can hold the same issue.

from lightline.vim.

paullemmens avatar paullemmens commented on July 30, 2024

I understand your preference for powerline! Unfortanately time nor skill permit me to get python up and running, so I installed vim-airline. Still no joy; the powerline fonts are working in the text (see my screenshot). I made sure to remove the lightline.vim plugin file and then the screenshot became the following.

image

" An example for a vimrc file.
"
" Maintainer:   Bram Moolenaar <[email protected]>
" Last change:  2008 Jul 02
"
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"         for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"       for OpenVMS:  sys$login:.vimrc

" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
  finish
endif

set encoding=utf-8
set nobackup
set history=50      " keep 50 lines of command line history
set ruler       " show the cursor position all the time
set showcmd     " display incomplete commands
set noshowmode      " Don't show --INSERT--
set showmatch
set showtabline=2
set guitablabel=%N:\ %t%m%r
set guitabtooltip=%N:\ %F%m%r
set statusline=%t%m%r%=%n\ (%l,%c%V)
set laststatus=2
set noincsearch
"set ff=unix
set visualbell
let g:tex_fold_enabled=1
"set wildignore=*.o,*~,~.pyc

set autoindent
"set autoread                                                 " reload files when changed on disk, i.e. via `git checkout`
set number                                                   " show line numbers
set ruler                                                    " show where you are
set scrolloff=3                                              " show context above/below cursorline
set showcmd
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc
"set wildignore=*.o,*~,~.pyc
set wildmenu                                                 " show a navigable menu for tab completion
set wildmode=longest,list,full

" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
"let &guioptions = substitute(&guioptions, "t", "", "g")
set guioptions-=tT
syntax enable
au GUIEnter * simalt ~x
set guifont=Inconsolata\ for\ Powerline:h13

" Stuff for lightline status line thingy
let g:airline_powerline_fonts = 1
let g:airline_symbols = {}
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
"let g:lightline = {
    "\ 'colorscheme': 'solarized',
        "\ 'active': {
        "\   'left': [ [ 'mode', 'paste' ],
        "\             [ 'readonly', 'filename', 'modified' ] ]
        "\ },
    "\ 'component': {
        "\   'readonly': '%{&filetype=="help"?"":&readonly?"":""}',
        "\   'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
    "\ },
    "\ 'component_visible_condition': {
        "\   'readonly': '(&filetype!="help"&& &readonly)',
        "\   'modified': '(&filetype!="help"&&(&modified||!&modifiable))'
        "\ },
    "\ 'separator': { 'left': '', 'right': '' },
    "\ 'subseparator': { 'left': '', 'right': '' }
    "\ }

set background=dark
"color ps_color
colorscheme solarized
let g:solarized_italic=0
let g:solarized_bold=0

" Don't use Ex mode, use Q for formatting
"map Q gq

" CTRL-U in insert mode deletes a lot.  Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>

" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
  set mouse=a
endif
" Enable basic mouse behavior such as resizing buffers.
set mouse=a
if exists('$TMUX')  " Support resizing in tmux
  set ttymouse=xterm2
endif


" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

" keyboard shortcuts
"let mapleader = ','
"map <C-h> <C-w>h
"map <C-j> <C-w>j
"map <C-k> <C-w>k
"map <C-l> <C-w>l
"map <leader>l :Align
"nmap <leader>a :Ack 
"nmap <leader>b :CtrlPBuffer<CR>
"nmap <leader>d :NERDTreeToggle<CR>
"nmap <leader>f :NERDTreeFind<CR>
"nmap <leader>t :CtrlP<CR>
"nmap <leader>T :CtrlPClearCache<CR>:CtrlP<CR>
"nmap <leader>] :TagbarToggle<CR>
"nmap <leader><space> :call whitespace#strip_trailing()<CR>
"nmap <leader>g :GitGutterToggle<CR>
"nmap <leader>c <Plug>Kwbd
"map <silent> <leader>V :source ~/.vimrc<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>

" keyboard shortcuts
"inoremap jj <ESC>

" plugin settings
"let g:ctrlp_match_window = 'order:ttb,max:20'
"let g:NERDSpaceDelims=1
"let g:gitgutter_enabled = 0

" Only do this part when compiled with support for autocommands.
if has("autocmd")

  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,
  " 'cindent' is on in C files, etc.
  " Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on

  " Put these in an autocmd group, so that we can delete them easily.
  augroup vimrcEx
  au!

  " For all text files set 'textwidth' to 78 characters.
  autocmd FileType text setlocal textwidth=78

  " When editing a file, always jump to the last known cursor position.
  " Don't do it when the position is invalid or when inside an event handler
  " (happens when dropping a file on gvim).
  " Also don't do it when the mark is in the first line, that is the default
  " position when opening a file.
  autocmd BufReadPost *
    \ if line("'\"") > 1 && line("'\"") <= line("$") |
    \   exe "normal! g`\"" |
    \ endif

  augroup END

else

  set autoindent        " always set autoindenting on

endif " has("autocmd")

" For some reason, 
au BufRead,BufNewFile *.R set filetype=r
au BufRead,BufNewFile *.r set filetype=r
au BufRead,BufNewFile *.Rmd set filetype=rmd
au BufRead,BufNewFile *.rmd set filetype=rmd
autocmd BufRead,BufNewFile *.md set filetype=markdown
let rmd_syn_hl_chunk = 0

" automatically rebalance windows on vim resize
"autocmd VimResized * :wincmd =

"" Fix Cursor in TMUX
"if exists('$TMUX')
  "let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
  "let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
"else
  "let &t_SI = "\<Esc>]50;CursorShape=1\x7"
  "let &t_EI = "\<Esc>]50;CursorShape=0\x7"
"endif

" Go crazy!
"if filereadable(expand("~/.vimrc.local"))
  " In your .vimrc.local, you might like:
  "
  " set autowrite
  " set nocursorline
  " set nowritebackup
  " set whichwrap+=<,>,h,l,[,] " Wrap arrow keys between lines
  "
  " autocmd! bufwritepost .vimrc source ~/.vimrc
  " noremap! jj <ESC>
  "source ~/.vimrc.local
"endif

" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
if !exists(":DiffOrig")
  command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
          \ | wincmd p | diffthis
endif

set nocursorline " don't highlight current line

" Personal key mappings
map!    ,,  <ESC>
map <F5>    :set fo-=a<CR>
map <F6>    :set fo+=a<CR>
imap    <F5>    <ESC>:set fo-=a<CR>a
imap    <F6>    <ESC>:set fo+=a<CR>a
map <F7>    :setlocal spell spelllang=nl<CR>
map <F8>    :setlocal spell spelllang=en_us<CR>

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

To summarize the result, there's two cases.

  • In GVim for Windows, vim-airline and lightline.vim hold the same issue around the patched-font (for Powerline).
  • GVim for Windows holds a bug around statusline.

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Ah, here's a quick test.
Try the test without lightline.vim and vim-airline.
Firstly, you execute the following command.

set statusline=hello

The statusline will say hello.
Then, try the following command.

set statusline=

If the statusline does not show the triangles, it is a bug of GVim for Windows.

from lightline.vim.

paullemmens avatar paullemmens commented on July 30, 2024
  1. I cleaned out my entire vimfiles folder and fired up a clean gvim.
  2. set encoding=utf-8
  3. set guifont=Inconsolata\ for\ powerline:h13
  4. set statusline=hello

WORKED

  1. set statusline=> (you know the big one from the patched font)

WORKED (see below)

image

from lightline.vim.

paullemmens avatar paullemmens commented on July 30, 2024

And a quick addition, I just copied back my vimfiles folder but now commented out everything except the three relevant things (encoding, guifont, and laststatus) as well as airline airline settings. Still no joy, so it appears not something in the vimrc.

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Another test.
Disable lightline and airline.
Then add the following config in vimrc.

function! MyStatusline()
  return ""
endfunction
set statusline=%!MyStatusline()

Restart GVim.

from lightline.vim.

paullemmens avatar paullemmens commented on July 30, 2024

W00h00 ... your last suggestion with "\uXXXX" did the trick.

Thanks for bearing with me and all the detailed suggestions!

image

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Nice. I'll add to the document.

from lightline.vim.

her avatar her commented on July 30, 2024

hey @itchyny

I really love lightline so far thanks for all the hard work. your suggestions about ue0bx fixed my glyph issues

I'm just wondering though: how did you know this would fix the glyph issue? is there a place where I can find these codes associated with these glyphs?

thanks again 😄

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Try :h lightline-problem-9.

from lightline.vim.

Related Issues (20)

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.