File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ <h3>Contents</h3>
2929 < li > < a href ="#gnu-readline "> GNU Readline</ a >
3030 < li > < a href ="#nav-bindings "> User Interface Navigation</ a >
3131 < li > < a href ="#readline-funcs "> Custom Readline functions</ a >
32+ < li > < a href ="#vi-mode "> Vi-Mode In The Input Bar</ a >
3233 </ ul >
3334 </ section >
3435 < section >
@@ -220,10 +221,31 @@ <h3>Custom Readline functions</h3>
220221$endif</ code > </ pre >
221222 </ p >
222223 </ section >
224+ < section >
225+ < h3 id ="vi-mode "> Vi Mode</ h3 >
226+ < p > To be able to use vi-mode bindings in the input bar, put in < code > inputrc</ code > :</ p >
227+ < pre > < code > $if profanity
228+ set editing-mode vi
229+ $endif</ code > </ pre >
230+ < p > Here are some examples of what you can do with it:</ p >
231+ < pre > < code > $if profanity
232+ set editing-mode vi
233+ set keymap vi-move
234+ # Use Space as a leader-key with " "
235+ " q": "i/quit\r"
236+ # Use j/k to move up and down in the window.
237+ "k": prof_win_pageup
238+ "j": prof_win_pagedown
239+ set keymap vi-insert
240+ # Correct last message quickly:
241+ "\C-e": "/correct \t"
242+ $endif</ code > </ pre >
243+ < p > You can find out all the keys you can use using < code > bind -p</ code > on bash.</ p >
244+ </ section >
223245 </ article >
224246 < footer >
225247 < p class ="matty "> site designed by < a href ="http://www.matthewbalaam.co.uk "> Matthew Balaam</ a > </ p >
226248 </ footer >
227249</ body >
228250
229- </ html >
251+ </ html >
You can’t perform that action at this time.
0 commit comments