ryvnf / readline.vim Goto Github PK
View Code? Open in Web Editor NEWReadline emulation for command-line mode
Readline emulation for command-line mode
Hi
your package is great. It is discussed there to merge it in neovim neovim/neovim#10799
you may be interested
I miss a counterpart for rubout_longword()
to delete forward to end of space delimited word 😄
P.S. It would be great to update the documentation using established Vim terms:
iskeyword
is word (:h word
vs :h WORD
).Escape is currently mapped to do nothing in the plugin This is to prevent an invalid meta-mapping from closing the command line. A user on IRC has requested that should not be remapped.
I personally think that pressing an invalid meta-mapping (like M-v when user meant to press M-b) closing or running the command-line can be very frustrating, which is the motivation for mapping it to <Nop>
. I also think that people generally press ENTER to run the command, or CTRL-C to cancel it (but that is only from my experience, and might be wrong).
I mainly see two possible solutions for this:
Adding an option (like g:readline_esc_nop
) which allows the user to explicitly get the behavior they want.
Creating a mapping for <Esc><Esc>
which emulates the single <Esc>
press. This would require reading the x
-flag in 'cpoptions'
, and would require checking if a custom mapping should be run when pressing this key combination.
Not mapping ESC and encouraging user to map <Esc>
to <Nop>
in their vimrc if this is a problem.
Of these two solution, I think number 1 is to be preferred, as it is simple. I personally don't like number 3, as I like the current behavior (but I would be open to implement it if enough other people would prefer it).
I also don't know how many other people dislike remapping ESC, so this might not be a problem. But I assume the user on IRC can't be the only one.
I like the readline mappings in insert mode as vim-rsi
provides, but I also like that readline.vim
in commandline mode is more "readline-like".
However when I have both installed, vim-rsi
takes precedence. As vim-rsi
doesn't provide an option to disable it in commandline mode, is it possible to somehow force readline.vim
to override vim-rsi
s mappings or prevent vim-rsi
form overriding readline.vim
s mappings?
so far, when :paste is run then this stops working
It is possible to implement the C-@
(set mark) and C-x C-x
(exchange point and mark) commands from Readline.
Problems with implementing these mappings it is difficult to ensure the mark is in sync when the user changes to another line in history. Readline will reset the mark to column 0 each time the user changes to another line in history, this is difficult to achieve from Vim.
Also don't think these mappings are widely used, so it might not be the best idea to implement these in readline.vim, if the intention is to keep the plugin small and simple.
I followed the instructions at https://www.vim.org/scripts/script.php?script_id=5633
and unzipped the directory into my .vim. I got plugin/readline.vim
in my .vim and doc/readline.txt
But I am unable to figure out how to use this here. How do I "load" the file in my .vimrc
(or something else) and start using it? I could not figure out the instructions. Any suggestions?
Hello there!
Thank you so much for this plugin, moving around the vim command line was really challenging until I found your work!
I found a minor inconsistency with the behavior of s:yankbuf on the vim command-line compared to the bash command-line when using <c-w>
twice.
For example:
in bash
echo hello world█ # <c-w>
echo hello █ # <c-w>
echo █ # <c-y>
echo hello world█
in vim
:echo hello world█ # <c-w>
:echo hello █ # <c-w>
:echo █ # <c-y>
:echo hello █
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.