macro

Why does typing 'q' exit vim? (.man file)

Why does typing 'q' exit vim? (.man file) When I type the character q on my keyboard in vim, it exits vim. Why? Today I tried it edit a file with the file extension .man. I wanted to edit the file with a macro, so I tried to type qq — but when the first …

Total answers: 1

Mutt: ask before deleting messages from Trash

Mutt: ask before deleting messages from Trash I have defined in Mutt two "trash" macros — one for the Trash folder (just mark as deleted and sync) and one for the remaining folders (save into Trash and sync): folder-hook . ‘macro index <delete> "s=Trash<enter><enter><sync-mailbox><change-folder>^<enter>"’ folder-hook =Trash ‘macro index <delete> "<delete-message><sync-mailbox><change-folder>^<enter>"’ Together with set delete = …

Total answers: 1

output redirection issue – m4 macro with self increasing build counter

output redirection issue – m4 macro with self increasing build counter My goal is to create a m4 macro, that reads a value from a file (BUILD), increases it and then saves the output into the file. I came up with the following solution (BUILD.m4): define(`__buildnumber__’,`esyscmd(cat BUILD)’)dnl define(`counter’,__buildnumber__)dnl popdef(__buildnumber__)dnl define(`count’,`define(`counter’,eval(counter+1))counter’)dnl count dnl When BUILD contains …

Total answers: 1

Can I launch macros and shortcuts from a second keyboard on Linux?

Can I launch macros and shortcuts from a second keyboard on Linux? I have a small numpad keyboard which I would like to use for launching macros and shortcuts, along side my regular keyboard. I can attach macros and shortcuts to these keys (i.e, numpad 1 minimises the active window), but my primary keyboard numpad …

Total answers: 4

How to comment multiple lines at once?

How to comment multiple lines at once? How can I select a bunch of text and comment it all out? Currently I go to the first line, go to insert mode then type # left-arrowdown-arrow and then I repeat that sequence, perhaps saving a few keystrokes by using the . repeat feature to do each …

Total answers: 6

Interacting with X applications programmatically

Interacting with X applications programmatically I have an application which is built using GTK+. The application has a very simple interface. When started, the same window always opens, with a few input controls. We want to write a script to fill in text in a couple fields, check a check box, then click a button. …

Total answers: 3

Keyboard Shortcut To Send Text Strings To Program

Keyboard Shortcut To Send Text Strings To Program How can I configure a shortcut key to send a text string to the current program? The purpose is to type common entries quicker (email address, street address, phone number, username, favorite quote, etc). I don’t need any further automation than just entering the text. Gentoo Linux …

Total answers: 5

Making shortcuts cross desktop environment, possible?

Making shortcuts cross desktop environment, possible? I’m a big fan of keyboards, so a lot of thing a done by combination of keys, like open a file browser, web browser etc. Is there some daemon that can monitor my key presses, and launch some program afterwards, so that I won’t have to configure anything else …

Total answers: 3

Is there a vim shortcut for <name of current file>?

Is there a vim shortcut for <name of current file>? In vim, if I’m working on a Python script, I will commonly type: :! python this_script.py to execute the script. Is there a shortcut for the name of the current file? If not, can I easily make one? I’m new at vim, and I’m not …

Total answers: 4