Giter Site home page Giter Site logo

Cause lagging in vim about vim-xkbswitch HOT 5 OPEN

lyokha avatar lyokha commented on May 24, 2024
Cause lagging in vim

from vim-xkbswitch.

Comments (5)

lyokha avatar lyokha commented on May 24, 2024

Try it this way (for terminal):

vim --noplugin -c 'runtime plugin/xkbswitch.vim'

Is it still bad?

from vim-xkbswitch.

aborilov avatar aborilov commented on May 24, 2024

no, with just this plugin, work normally.
that plugin in pair with some other break vim.
here list of my plugins. may be you will see some suspicious plugin :)

Bundle 'Raimondi/delimitMate'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-fugitive'
Plugin 'scrooloose/syntastic'
Plugin 'airblade/vim-gitgutter'
Plugin 'scrooloose/nerdcommenter'
Plugin 'Valloric/YouCompleteMe'
Plugin 'altercation/vim-colors-solarized'
Plugin 'klen/python-mode'
Plugin 'tomasr/molokai'
Plugin 'vim-scripts/taglist.vim'
Plugin 'szw/vim-ctrlspace'
Plugin 'mileszs/ack.vim'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'edkolev/tmuxline.vim'
Plugin 'sjl/gundo.vim'
Plugin 'benmills/vimux'
Plugin 'ryanoasis/vim-devicons'
" start to work too slow
" Plugin 'lyokha/vim-xkbswitch'
Plugin 'machakann/vim-sandwich'
Plugin 'pearofducks/ansible-vim'
Plugin 'fatih/vim-go'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-unimpaired'
Plugin 'rizzatti/dash.vim'

from vim-xkbswitch.

lyokha avatar lyokha commented on May 24, 2024

Try disable translation and Select mode mappings by putting in .vimrc lines

let g:XkbSwitchIMappings = []
let g:XkbSwitchSkipGhKeys = ['gh', 'gH']

from vim-xkbswitch.

aborilov avatar aborilov commented on May 24, 2024

from vim-xkbswitch.

xaiamov avatar xaiamov commented on May 24, 2024

I observed the same problem and found out that the reason was in sequence which was used for the arrow keys: https://stackoverflow.com/a/25111512/4177749

I just needed to switch back to the en_us layout in command mode without remembering current layout. So I have completely disabled the plugin solved the problem with this code in .vimrc:

function <SID>condLayout()
	if mode() == "n"
		call libcall('/usr/local/lib/libxkbswitch.dylib', 'Xkb_Switch_setXkbLayout', "2")
	endif
endfunction

autocmd InsertLeave * call timer_start(200, { tid -> <SID>condLayout()})

The script checks current vim mode after 200 ms timeout and if it is "normal" - switches to en_us layout. Timeout helps to avoid switching layout on cursor movements.

Thank you guys for the library and this plugin which helped me to find the solution.

from vim-xkbswitch.

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.