readline
map jj to Esc in inputrc (readline)
You should rearrange the inputrc so the commented line comes after set keymap vi-insert. Like this: set bell-style none $if mode=vi set keymap vi-command “gg”: beginning-of-history “G”: end-of-history set keymap vi-insert #notice how the “jj” movement is “jj”: vi-movement-mode #after ‘set keymap vi-insert’? “\C-w”: backward-kill-word “\C-p”: history-search-backward $endif
How to delete a whole word after the cursor in a Bash-like command-line tool? [duplicate]
Use Esc + D or Alt + D to delete the word on the right.
DataInputStream deprecated readLine() method
InputStream is fundamentally a binary construct. If you want to read text data (e.g. from the console) you should use a Reader of some description. To convert an InputStream into a Reader, use InputStreamReader. Then create a BufferedReader around the Reader, and you can read a line using BufferedReader.readLine(). More alternatives: Use a Scanner built … Read more
editline/history.h and editline/readline.h not found/working on macOS when trying to compile with developer tools installed already
Include only #include <editline/readline.h> which should exist if the command line tools are installed. This file contains the “readline wrapper” for libedit, including the history functions as well. An include file <editline/history.h> does not exist on OS X. I tested your code with that modification, and it compiled and ran without problems.
Python Serial: How to use the read or readline function to read more than 1 character at a time
I see a couple of issues. First: ser.read() is only going to return 1 byte at a time. If you specify a count ser.read(5) it will read 5 bytes (less if timeout occurrs before 5 bytes arrive.) If you know that your input is always properly terminated with EOL characters, better way is to use … Read more
How to read only the first line of a file
open my $file, ‘<‘, “filename.txt”; my $firstLine = <$file>; close $file;
Python 3.6.1 crashed after readline module installed
Try pip install gnureadline instead. And remove readline: pip uninstall readline. As explained by the gnureadline package page on pypi.org: Some platforms, such as macOS, do not ship with GNU readline installed This module [bundles] the standard Python readline module with the GNU readline source code, which is compiled and statically linked to it. The … Read more
How to get vi keybindings to work in mysql client?
Quick google reveals this… don’t know if it helps. Copied here for convenience: Add the following on OS X 10.5: $ cat .editrc bind -v This will work for OS X 10.4 and other operating systems: $ cat .inputrc set editing-mode vi