Sponsored Content
Top Forums UNIX for Dummies Questions & Answers encountering problem with vim Post 302272553 by Gopi Krishna P on Wednesday 31st of December 2008 12:27:11 AM
Old 12-31-2008
can any body help regarding this vi editor problem
I am getting the some garbage if I press 'i ' to enter in to insert mode .why we get such thing .and how to get rid of that?
 

10 More Discussions You Might Find Interesting

1. Programming

Format Problem with vim

Hi, there. Everyone had a great Thanksgiving? I have a slice format problem when I am using vim to edit c++ source code. I don't know how to discribe the problem exactly. You see, usually when I use the command "vi hello.cpp" to write a code, it will have the format like this: #include... (4 Replies)
Discussion started by: HOUSCOUS
4 Replies

2. Shell Programming and Scripting

Vim problem

Can someone explain me why sometimes the cursor can not be moved to needed position? for example: mysql -u root db -sBe "ALTER TABLE $i ENGINE=$ENGINE"; echo -e "${GG}OK${BB}"; In this line I can not go to position after $i, why? This is not first time I see such issue. "INSERT" pressed :) (0 Replies)
Discussion started by: mirusnet
0 Replies

3. UNIX for Advanced & Expert Users

vim

Does anyone know the fast way to go to tab/2 distance in vim. I mean set four spaces. (1 Reply)
Discussion started by: mirusnet
1 Replies

4. 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

5. UNIX for Dummies Questions & Answers

Problem to map VIM cursor moving in InsertMode

Hi all What I want? I want in Insert mode, press Alt-hjkl move cursor, and then back to insert mode. I know ctrl-o, hjkl can do the job. but everytime I want to move, i have to press ctrl-o, or I have to count how many hjkl I will do, do a C-O (n)hjkl. What I tried (example only with 'j')... (2 Replies)
Discussion started by: sk1418
2 Replies

6. Shell Programming and Scripting

Scan a file in realtime and execute certain commands on encountering 5 consecutive identical lines

Mysql log has something like below: I need a bash shell script that will do the following: 1) The script will scan the mysql.log file constantly in real time (something like tail -F mysql.log) 2) If it encounters 5 consecutive identical lines then it would invoke some commands (say... (4 Replies)
Discussion started by: proactiveaditya
4 Replies

7. Ubuntu

Encountering problem on upgrading the packages

Hi folks, Ubuntu 9.04 I have an old box not running for years. I just dig it out from the store room. On running; $ sudo aptitude update ...... ...... Err http://hk.archive.ubuntu.com jaunty/main Packages 404 Not Found Err http://hk.archive.ubuntu.com jaunty/restricted Packages ... (1 Reply)
Discussion started by: satimis
1 Replies

8. UNIX for Dummies Questions & Answers

Vim Match problem

Goodmorning, I've some problem in using regular expression in a VIM syntax configuration file. I've need to match a string as <<< some to match >>> so that it matches only some to match . With standard regular expression i know that for this goal works fine the regex: (?<=<{3}).*(?=>{3}) ... (4 Replies)
Discussion started by: keltron
4 Replies

9. Programming

Need program to continue even when encountering errors

I am writing a program, and want to have the option for the program to continue execution even should things go wrong. I use an option --ignore-errors. The problem is what I do when an error occurs, set the values to zero, or fill them up with some values, for example taken from a simple unit... (3 Replies)
Discussion started by: kristinu
3 Replies

10. Shell Programming and Scripting

Split a file based on encountering header

I need to split a file based on headers found Input file file1 content: ADD john mickey DROP matt sam output of file F1 john mickey output of file F2 matt sam (5 Replies)
Discussion started by: Diddy
5 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 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy