Skip to content

web - USB Fußpedal für den vi/vim

Wenn man einen vi/vim Editor nutzt, muss man die Taste "i" betätigen um einen Text eingeben zu können. Diese wiederkehrende Aufgabe hat ein findiger Nutzer diese Aufgabe zu seinem Fuß delegiert. Er suchte nach einem extrem günstigen USB-Fußpedal und fand eins. Die Wunschvorstellung war "sende ein i beim darauf treten" und "sende ein ESC beim fuß entfernen" und diese Aufgabe konnte er auch umsetzen.

Aktuell sucht der Bauherr nach einem verbesserte Model um "Hinzufügen am Anfang und am Ende der Zeile" ebenfalls delegieren zu können.

Quelle

Translate to de es fr it pt ja

tool - vi moving arround

Apanding to the simple editing post i would like to add this time some hints for moving arround

  • ctrl+F - scroll forward one screen
  • ctrl+B - scroll backward one screen
  • ctrl+D - scroll forward half a screen
  • ctrl+U - scroll backward half a screen
  • H - move to the home/top line of the screen
  • M - move to the middle of the screen
  • L - move to the last line of the screen
  • + - move to the first character of the next line
  • - - move to the first character of the previous line
  • ? - search backward
  • N - step search backward
Translate to de es fr it pt ja

tool - vi a little more basics for simple editing

I am using the vi since a few years. A few months ago i realized that i am just using a bit of the mighty power of the vi. Thats why O`Reilly's Learning the vi editor was welcomed in my house :-). I have just finised a small part of the book but found already some "new" stuff for me. Thats why this entry is a supplement to my vi knowledge. But maybe there is something for you out there too.

  • :e! - returns you the last saved version of your file
  • W - move forward from word by word without considering symbols and punctuation
  • c2b - change two words backwards
  • c$ - change to the end of the line
  • cc - change the entire current line
  • C - change characters from current cursor position to the end of the line
  • s - substitute from current position
  • S - same as cc
  • R - puts you in "overwrite" mode
  • ~ - change case of your letter (Upper- to Lowercase and other way)
  • D - deletes from courrent position to the end of the line
  • x - deletes current character
  • X - deletes character before current position
  • xp - delete current character ad put after curser
  • y$ - yankes to the end of the line
  • . - repeats last command
  • O - opens blank line above curser
  • J - joins two (or more) lines
  • e - moves to the end of a word

Wow, after this list it is hard to believe that i am using the vi for years now, "we are absolute beginners" comes to my ears ;-).

Translate to de es fr it pt ja

tool - cli file manager with vi keybindings - ranger and vifm

Searching for perfect tools seams to have a long tradition. Also switching from gui tools to cli tools back to gui and so one is a great game. This time i decided to try out some cli file managers. Since we are working on the cli it is a massive benefit if the software supports vi keybindings.

At first i tried a recommended tool called ranger. It feels very naturaly when you browse your dictionaries and it looks like the osx finder in console mode - maybe the finder "adopt" his design from a cli tool that i do not know so i do not know if the compare is correct, do not blame me for that ;-).

It still feels a bit under development but it is no wasted time if you give him a try. A short howto can be found here

Second file manager i tried is vifm. It is definitly a file manager for vi lovers :-). Vifm provides, if wished, a two panel view like used by mc.

Since i am a vi (i know vi is the center of eVIl), i like working with vifm and with the option of having a two panel layout if feels like mc on (vi) dope :-D. This tool definitely get a "try it out" mark, do it!

A short help can be found here

Translate to de es fr it pt ja

VI/VIM - Search

date: 111025 search

:set [ic|noic]
sets globaly the search to ["ignore case"|"not ignore case"] (not to be or be a case sensitive searcher ;-) ).
%s/myMixedCaseWord/ReplacedWord/gi
let you search/replace with ignored case
/thIsISmyCaseInsensitVSearch\c

searchs for your term with ignored case

Links yolinux.com - tutorial - vim vim.wikia.com

date: 111229 search and replace

:$rs/searchterm/replaceterm/$a
$r (the range) can be: % - the whole file 23 - works on line 23 $ - nothing, only for current line.

$a (the argument) can be: g - whole line i - be case insensitive I - be case sensitive c - commit every change [y|n] $ - nothing, only first searchterm will be replaced.

tuxfiles.org

Translate to de es fr it pt ja