Sponsored Content
Full Discussion: Vim tips and tricks
Top Forums UNIX for Beginners Questions & Answers Vim tips and tricks Post 302439619 by royalibrahim on Friday 23rd of July 2010 06:45:08 AM
Old 07-23-2010
Hi,
I am using VIM 7.1 version on my Ubuntu 8.04 (hardy heron). I am irritated to see the auto matching cursor whenever it comes across parantheses, brackets and braces while editing. I used ':set noshowmatch', but no use. What other options are available for me?
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

tar tricks

Hello there, Is there anyway to make the tar utility print the contents of the files inside it (not list the files, but rather their contents) sequentially from the command line? What I ultimately would like to do is to have a way of printing the contents of each file in the tar archive... (2 Replies)
Discussion started by: neked
2 Replies

2. Shell Programming and Scripting

need couple of ksh tricks please

1) I ran myScript with 2 arguments, I meant to use 3 if I do r my, it will rerun it with the 2 arguments. is there a way I can do r my and add a third argument at the end? 2) say I did myAcript.ksh 2 5 7 8 I realise my typo. is there an easy way to redo the command replacing A with S? ... (4 Replies)
Discussion started by: JamesByars
4 Replies

3. Post Here to Contact Site Administrators and Moderators

Solaris tips and tricks

What do you think could we open new top topic with tips and tricks and to show to other users some tricks what do we know like dtrace , new virtual server , how to add new users etc. This is only suggestion (1 Reply)
Discussion started by: solaris_user
1 Replies

4. UNIX for Dummies Questions & Answers

Sed Tricks

I have a file which containd a string "old" and I need to replace all old with "new" if and only if it is a string not part of a string like Gold or fold etc. I tried with sed like below echo "old gold old" | sed 's/old/new/g' It doesn't give the desired output, It give "old Gnew new".... (3 Replies)
Discussion started by: siba.s.nayak
3 Replies

5. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

6. UNIX for Advanced & Expert Users

Basic VI tricks

I found a decent guide of VI basic tricks. This guide does expect you to have a decent understanding of VI. It does not go over very much beginner related. vi Manual (3 Replies)
Discussion started by: cokedude
3 Replies
MAILPLATE(1)															      MAILPLATE(1)

NAME
mailplate - reformat mail drafts according to templates SYNOPSIS
mailplate [[--new | -n] | [--editor | -e]] [--keep-unknown | -k] [--verbose | -v] [--debug | -d] template-name message-file mailplate [--keep-unknown | -k] [--verbose | -v] [--debug | -d] template-name < message-data mailplate [[--auto | -a] | [--menu | -m]] [[--new | -n] | [--editor | -e]] [--keep-unknown | -k] [--verbose | -v] [--debug | -d] message-file mailplate [[--auto | -a] | [--menu | -m]] [--keep-unknown | -k] [--verbose | -v] [--debug | -d] < message data mailplate [--help | -h] mailplate [--version | -V] DESCRIPTION
mailplate is a programme that reformats mail drafts according to a given template. The template may be specified on the command line, but mailplate can also use control information from the template files to automatically select an appropriate template (--auto). A selection menu feature is planned (--menu). Applying a template means obtainined select data from an existing mail message (unless --new is specified) and to fill it into appropriate slots in the template. Messages are processed in three parts: headers, body, and signature. When --new is given, an empty instantiation of the template is written to stdout. At the moment, --new cannot be combined with --editor. The template can define two types of headers: mandatory and preservatory. Mandatory headers take precedence over headers in the existing message and thus overwrite them. Preservatory headers instruct mailplate to port their data from the existing mail message. Headers in the existing message but not defined in the template are dropped, unless --keep-unknown is given. Body and signature are separated by '-- '. If this sentinel is not found, no signature is extracted. Templates can be interpolated and data filled into slots. Helper slots are filled with the output of helper commands (which must be defined in the configuration), environment variable slots are just that, and mail variable slots can be filled with data obtained by running regexps or commands over the message. This script can be run in multiple ways: o As a filter, it applies a template to data from stdin and writes the result to stdout. o When --editor is passed, the script spawns sensible-editor on the result. It may thus be used as the editor for your mail user agent. o Given a file, it modifies the file, unless it cannot write to the file, in which case it writes to stdout. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`--'): --auto, -a Turn on template auto-discovery. --menu, -m Choose from a list of templates (not yet implemented) --new, -n Create a new message. --editor, -e Spawn editor once template is applied. --keep-unknown, -k Preserve mail headers not specified in template. --verbose, -v Write informational messages to stderr. --debug, -d Start a debugger after initialisation. --help, -h Show summary of options. --version, -V Show version of program. MUTT INTEGRATION
I use mailplate as my $editor for mutt, with the following setting in my ~/.mutt/muttrc: set editor="~/.bin/mail/mailplate --edit --auto --keep-unknown" mailplate currently has a bit of a limitation, or at least I have not figured out a way how to work around it sensibly yet. If you re-edit a message from mutt's compose menu, it causes mailplate to reprocess the message, which you may not want. Similarly, if you find yourself editing messages from the index or pager, you probably also don't want mailplate to get in the way. For these cases, I currently use the following two keybindings: macro compose e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit-headers>:set editor="$my_editor"<enter>' "invoke normal editor to edit message" macro index,pager e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit>:set editor="$my_editor"<enter>' "invoke normal editor to edit message" VIM INTEGRATION
I am often editing a message with vim and find that I need to use a different identity. For this purpose, I have the following keybindings in my ~/.vim/ftplugin/mail.vim: nmap <buffer> <F1> :w<CR>:%!mailplate --keep-unknown --auto<CR> nmap <buffer> <C-P><F1> :w<CR>:%!mailplate --keep-unknown private<CR> nmap <buffer> <C-P><F2> :w<CR>:%!mailplate --keep-unknown debian<CR> Now when I reply to a message, mailplate automatically choses the right template, and if I later change my mind, I can press C-p, to override the choice and select the private template, or just hit to have it re-run the auto-detection. SEE ALSO
http://madduck.net/code/mailplate/ /usr/share/doc/mailplate/README AUTHOR
This manual page was written by martin f. krafft <madduck@madduck.net> with help from Carl Furstenberg. COPYRIGHT
Copyright (C) 2007 martin f. krafft September 30, 2007 MAILPLATE(1)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy