Coder Social home page Coder Social logo

Comments (7)

itchyny avatar itchyny commented on July 30, 2024

I cannot reproduce this issue.
Can you provide a minimal .vimrc config?

from lightline.vim.

unkiwii avatar unkiwii commented on July 30, 2024

I can't figure out what configuration cause the problem, here is my .vimrc

execute pathogen#infect()

if !has('gui_running')
    set t_Co=256
endif

set ruler
set nu
set ai
set si
set sm
set guioptions-=T
set sta
set ts=4
set sw=4
set nowrap
set nocul
set showcmd
set showmode
set showmatch
set hlsearch
set incsearch
set clipboard=unnamed
set nobackup
set cursorline

" show whitespaces
set list
set listchars=eol:¶,tab\ ,trail:·

set wildmode=full
set wildmenu

" maps to move current line or slected lines
nnoremap <silent> <C-j> :m .+1<CR>==
nnoremap <silent> <C-k> :m .-2<CR>==
inoremap <silent> <C-j> <ESC>:m .+1<CR>==gi
inoremap <silent> <C-k> <ESC>:m .-2<CR>==gi
vnoremap <silent> <C-j> :m '>+1<CR>gv=gv
vnoremap <silent> <C-k> :m '<-2<CR>gv=gv

" on escape remove highlight
nnoremap <silent> <ESC> :nohlsearch<CR>

" save the current line, fix indentation in whole file and then go to the saved line (return to line before command)
noremap <silent> ,i <ESC>:let b:___lt___ = line('.')<CR> <ESC>gg=G<CR> <ESC>:exec b:___lt___<CR>

function! SwitchSourceHeader()
    if (expand ("%:e") == "cpp")
        if (filereadable(expand("%:r") . ".h"))
            find %:t:r.h
        else
            new %:r.h
        endif
    else
        if (filereadable(expand("%:r") . ".cpp"))
            find %:t:r.cpp
        else
            new %:r.cpp
            exe "normal i#include \"" . expand("%:t:r") . ".h\""
        endif
    endif
endfunction
au FileType cpp map <silent> ,s <ESC>:call SwitchSourceHeader()<CR>

syntax on

set laststatus=2 "show status bar always

function! LoadSession()
    if argc() == 0
        silent source Session.vim
    end
endfunction

au VimLeave * mksession!
au VimEnter * call LoadSession()

let s:lightline = { 'colorscheme': 'wombat' }
colors wombat

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

I still cannot reproduce with your .vimrc, using gvim.
Which OS do you use?
Also, paste the output of gvim --version.

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

Try to see what's happening when you remove the au VimEnter * call LoadSession() line.

from lightline.vim.

unkiwii avatar unkiwii commented on July 30, 2024

I've attached the output of gvim --version and when I remove the au
VimEnter * call LoadSession() is still the same; but I also see that
sometimes it works and sometimes don't, maybe is a problem with my
configuration.

2013/9/2 itchyny [email protected]

Try to see what's happening when you remove the au VimEnter * call
LoadSession() line.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-23665068
.

Lucas G. Sánchez
Web: lksanchez https://sites.google.com/site/lksanchez/
Cel: +5491138101647

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024

I don't think that this issue is related to a bug of this plugin. Seems to be a bug of Vim. Sorry, I cannot fix.

from lightline.vim.

itchyny avatar itchyny commented on July 30, 2024
  • Try the latest version of Vim.
  • Try MacVim.
  • Use vim-powerline instead and check if the same issue happens.

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.