Comments (9)
I made two mistakes.
- I could not handle plugin load order.
If you add your vimrc imap <CR>...
but lexima will be loaded after the vimrc and overrides it. I will fix this but you can use a workaround as below.
" insert this line above imap
call lexima#init()
- I missed the example.
It is necessary to escape '<'
to recognize '<CR>'
as 4 characters.
inoremap <expr> <CR> someCondition() ? yourMapping() : lexima#expand('<LT>CR>', 'i')
from lexima.vim.
Thanks for your idea. I will try to implement but the current implementation is too complex to expose.
It needs to refactor.
from lexima.vim.
+1
from lexima.vim.
Hi.
I have added lexima#expand()
function.
You can use it like below.
inoremap <expr> <CR> someCondition() ? yourMapping() : lexima#expand('<CR>', 'i')
Add this code after lexima#add_rule()
.
Please try it!
from lexima.vim.
Does not work in my setup, here's my modified vimrc (Line 465) for reference.
Let me know, if I can be of help somehow.
from lexima.vim.
Sorry I can not reproduce it.
Please send me the result of :imap
.
from lexima.vim.
Sorry, just recalled that I might have to disable automappings for <cr>
. Am I right?
Here's the :imap
output
i <Esc> *@<C-R>=lexima#insmode#escape()<CR><Esc>
i <Plug>(neocomplete_auto_refresh) * <C-R>=neocomplete#mappings#refresh()<CR>
i <Plug>(neocomplete_start_manual_complete) * <C-R>=neocomplete#mappings#manual_complete()<CR>
i <Plug>(neocomplete_start_auto_complete) * <C-R>=neocomplete#mappings#auto_complete()<CR>
i <Plug>(neocomplete_start_omni_complete) * <C-X><C-O>
i <Plug>(neocomplete_start_unite_quick_match) * unite#sources#neocomplete#start_quick_match()
i <Plug>(neocomplete_start_unite_complete) * unite#sources#neocomplete#start_complete()
i <Plug>(neosnippet_start_unite_snippet) * unite#sources#neosnippet#start_complete()
i <Plug>(neosnippet_jump) * neosnippet#mappings#jump_impl()
i <Plug>(neosnippet_expand) * neosnippet#mappings#expand_impl()
i <Plug>(neosnippet_jump_or_expand) * neosnippet#mappings#jump_or_expand_impl()
i <Plug>(neosnippet_expand_or_jump) * neosnippet#mappings#expand_or_jump_impl()
i <Plug>ISurround * <C-R>=<SNR>47_insert(1)<CR>
i <Plug>Isurround * <C-R>=<SNR>47_insert()<CR>
i <BS> * lexima#expand('<BS>', 'i')
i <Plug>(EasyAlign) * <C-O>:<C-U>call <SNR>2_lod_map('<Plug>(EasyAlign)', ['vim-easy-align'], "")<CR>
! <D-v> <C-R>*
i <C-G>S <Plug>ISurround
i <C-G>s <Plug>Isurround
i <C-G> * neocomplete#undo_completion()
i <Tab> pumvisible() ? "\<C-N>" : neosnippet#jumpable() ? "\<Plug>(neosnippet_jump)" : "\<Tab>"
i <C-L> * neocomplete#complete_common_string()
i <CR> * lexima#expand('<CR>', 'i')
i <C-S> <Plug>Isurround
i <Esc><Esc> * <Esc>
i <Esc> * pumvisible() ? neocomplete#cancel_popup() : "\<Esc>"
i <Space> * lexima#expand('<SPACE>', 'i')
i " * lexima#expand('"', 'i')
i ' * lexima#expand('''', 'i')
i ( * lexima#expand('(', 'i')
i ) * lexima#expand(')', 'i')
i [ * lexima#expand('[', 'i')
i ] * lexima#expand(']', 'i')
i ` * lexima#expand('`', 'i')
i { * lexima#expand('{', 'i')
i } * lexima#expand('}', 'i')
from lexima.vim.
Works just fine. Thanks @cohama
from lexima.vim.
A very late thank you!
from lexima.vim.
Related Issues (20)
- Suggestion: Add tags for help
- = setpos ('.', [0, 1, 1, 0])? '': '' appears in the command line when exiting insert mode HOT 1
- Prelude.vim has vim type variables that are not supported by version 7.4 HOT 4
- Prevent auto-close of quote when standing at a word boundary? HOT 4
- Lexima seemingly breaking "set nocompatible" HOT 4
- [Feature Request] Add g:lexima_manually_keys HOT 8
- Problem using lexima with multi-cursor when press Esc HOT 5
- expanding strings instead of letters HOT 3
- Case-sensitive HOT 10
- The "at" rule does not support \V in command-line mode HOT 5
- 'except' on cmdline mode is not working
- Abbreviations are not expanded in command-line mode HOT 1
- <Tab> key HOT 1
- Possibility of supressing flickering of Command mode while pressing backspace HOT 3
- How can I add rules for {} and [] HOT 3
- Add endwise rules for Lua. HOT 2
- "LISP mode"? don't pair singlequote or backtick in certain filetypes HOT 2
- There is no lexima-key-mappings section in the document HOT 2
- Is it possible to make lexima continue a bullet list? HOT 2
- Indentation fail for certain filetypes HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lexima.vim.