Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [macro]

The tag has no usage guidance.

0
votes
1answer
39 views

How to resolve SAS macro variable in shell script

I am running a shell script via X command within a SAS macro. I want to use a macro variable defined in SAS macro, in my shell script. I know if I pass that macro variable as parameter to shell script,...
3
votes
2answers
112 views

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 ...
0
votes
1answer
77 views

Mutt: Save message to different folder but stay on it

I'd like to write a macro (index, pager) that saves a message to the Archive mailbox but keep the current message open / selected, or even to to the previous entry. My current macro: macro index,...
1
vote
1answer
83 views

Mutt: move emails only if some emails are tagged

I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically. Currently, I do the ...
4
votes
2answers
363 views

Undoing C syntax mangling macros to make exctags able to create prototype tags

I can successfully create a tags file for vim with exctags (Exuberant Ctags). However, creating tags allowing to jump to the prototype of a function does not work, due the system headers using a ...
1
vote
1answer
68 views

LibreOffice placeholder fields documentation

I have to modify a LibreOffice template with a number of conditional statements. I managed to figure out one can add such statements through Insert > Fields > More fields, tab Functions, type ...
1
vote
1answer
330 views

vim: how to record norm commands?

I edit and correct a lot of identical files using those commands :%norm f^ID :%s/\s\+$// :%norm A, :%norm GG$x I also used the macro mode qa for record macro a and @a to execute But for some ...
1
vote
1answer
368 views

find and replace macro in libreoffice

How can I write a find and replace macro to merge many items in few, as "USA, Mexico, Canada, Honduras" in "America", "China, India, Vietnam" in "Asia" and so. Before macro: USA, Mexico, Canada, ...
2
votes
1answer
299 views

Put long list of e-mail addresses in multiple-row macro variable

I have a list of 20 e-mail addresses that I'm trying to put in a macro variable as multiple rows in a shell script. In "wide" format it works fine and appears as: to_list="email1@test.com,email2@test....
0
votes
1answer
37 views

How to test whether the present build platform is Scientific Linux from within an RPM spec file?

I would like to test if the present build platform is Scientific Linux from within a spec file. But I want this test to only return true if and only if the platform is Scientific Linux, so even the ...
1
vote
1answer
357 views

How to determine whether the system an RPM package is built on is CentOS from within a spec file?

I have a spec file where its Requires: fields depend on the specific distribution it's being built on. So I need to be able to create a conditional structure along the lines of: %if %{?fedora} ...
1
vote
1answer
48 views

Global “swap characters” macro in KDE

After moving from OSX back to KDE I found the thing I'm missing most is the Cmd+t global shortcut that flips the characters surrounding the cursor, making it easy to fix typos. The important aspect of ...
2
votes
2answers
2k views

Checking for required M4 macros… yelp.m4 not found

I am on Linux Mint 18 Cinnamon 64-bit. I was about to compile file-roller known as Archive manager for GNOME from source. But when running: ./autogen.sh There is a following M4 macro missing: ...
3
votes
2answers
8k views

Execute script from i3 config

Question: I'm using i3-wm and I have Mod3 working as a hotkey. I have the following in ./config/i3/config: #This command works bindsym Mod3+f exec "firefox" #This doesn't work nor do my other ...
1
vote
1answer
2k views

How to run batch sas job in unix sas?

I have 5 SAS jobs that I need to run sequentially, one after the other. I typically type in nohup sas filename1.sas & in the command line to run and manually check for progress every few hours. ...
1
vote
1answer
175 views

m4 macro implementation of global (non-volatile) counter

Is it possible to define a m4 macro (without arguments), which expands to 1 on first invocation, expands to 2 on second invocation, and so on? In other words, it should have internal memory storing ...
2
votes
2answers
306 views

Can mutt macros obtain properties from the current message?

In mutt, can macros can obtain some of the properties from the current message, in order to use them as variables? Here are some examples of potential macros, with the properties I'd wish to obtain in ...
2
votes
2answers
168 views

Auto-Complete and Shortcut Keys for Linux

I'm looking for something that will allow me to type anywhere, on anything and for this software to auto-complete. I used FastKeys on Windows which would also allow you to do custom shortcuts to open ...
1
vote
2answers
120 views

Create files from templates, substitutions in middle of other words

Is there a way to convince m4 to replace a macro in the middle of a word? I would like this file, day.m4: define(Sat,Cat)dnl Saturday and this command: m4 day.m4 to produce this output: Caturday ...
1
vote
1answer
2k views

Gmake macro expansion: macro calls macro with variable in arguments

In the following makeffile one macro process it's arguments to call another macro. I expect that makefile below will generate two targets and correct list of the targets in $TARGETS. But in fact it ...
1
vote
1answer
571 views

dot command in Vim, last change?

The dot command in Vim repeats the "last change", but I am not exactly sure what constitutes the "last change". For example, if I type the sequence: A;{ESC}j. Then a semi-colon is appended to the ...
2
votes
1answer
1k views

mutt: ask for confirmation before moving message to archive

I have following macro defined in my muttrc: macro index s ":set confirmappend=no delete=yes auto_tag=yes\n\ <save-message>=archive\n<sync-mailbox>:set delete=ask-yes\n" When I ...
71
votes
6answers
210k views

How to comment multiple lines at once? [duplicate]

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 ...
2
votes
1answer
953 views

Send keystrokes to a process on Console

If I have a terminal with a shell open, how can I write a shell script (any scripting language is ok with me!) that will send a keystroke to any one of the running processes? As an example, how could ...
2
votes
2answers
3k views

How to run a script by shortkey in elementaryOS?

I want to be able to run certain scripts by shortcut the way I do in ubuntu - for example some similar to this awesome script. (On that model I can search google the text selected in any text editor, ...
1
vote
0answers
336 views

How to setup keyboard shortcut that enters predefined text into X11 xterminal via SSH from mac OS?

I do a lot of remote programming on my CentOS linux server by opening an X11 xterminal window on my Mac OS, and SSH into the server. I'm looking for an easy to use method to enter a predefined text ...
8
votes
3answers
1k views

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 ...
1
vote
1answer
68 views

Emacs: mode-local macro with dashes and dots

In Emacs, how can I make a macro, that is local to the HTML mode, and uses dashes and dots? Take a look at the Elisp below: (define-abbrev-table 'html-mode-abbrev-table '(("..." "&hellip;") ;...
2
votes
1answer
102 views

Expand pattern under cursor to all files matching it

Is there anyway to let VIM expand the glob pattern to all files that match it? e.g when I type *.c, and press some key, it would become a.c b.c
2
votes
0answers
49 views

Handle local links to local files in emacs

I have a LaTeX document where I often have to insert pathnames of files on my machine of other LaTeX files. Is there a way in emacs do get the following: A command which opens a file selection ...
13
votes
3answers
12k views

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, ...
1
vote
1answer
333 views

Is it possible to have a screen macro for this?

Here's my .screenrc: defscrollback 5000 vbell on vbell_msg " dierre!!! ---- Wuff!! " screen -t GRINDER ssh dierre@grinder.dierre.lan screen -t TRUNK attrcolor b ".I" termcap xterm 'Co#256:AB=\...
5
votes
3answers
183 views

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 ...
2
votes
2answers
276 views

Vim markers and macros

Is there a way to make a macro operate up to a marker? I know if I do 5@a my macro will operate on 5 lines. Example: set marker with `mc` record a macro with `qa` ... now what? Obviously 'c@a just ...
13
votes
4answers
1k views

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? ...
4
votes
1answer
2k views

Automating typing strings in xmacro

Could you show me how to write macro in xmacro (that will work in whole desktop environment) that is able to expand strings? E.g. I will type "thx" and it will expand to "thank you".
15
votes
2answers
6k views

How to invoke an Openoffice macro from the Linux command line

I have an OpenOfice macro that I want to use to process the contents of an OpenOffice file. I am able to do this by opening the file with OpenOffice and then running the macro. How do I invoke the ...