Sponsored Content
Full Discussion: Vim tips and tricks
Top Forums UNIX for Beginners Questions & Answers Vim tips and tricks Post 302984362 by ctsgnb on Tuesday 25th of October 2016 05:41:54 AM
Old 10-25-2016
In the post #1 of this thread, it is mentionned :

Code:
dd : Deletes three lines from current cursor position downwards.(also :d)

Shouldn't it be dd : Deletes the current line instead ???

I would also add :
cw : change 1 word begining from current cursor position
ncw : change n word begining from current cursor position
cW: change word treating only whitespace (or line ends) as word delimiters
C : Change the whole line from the current cursor position
D : Delete the current line from current cursor position (leaving in command mode contrary to the C command which do the same but switch to insert mode).
R : Replace (kind of overwrite, this command switch to insert mode)
My 2 cents.

Last edited by ctsgnb; 02-13-2017 at 07:01 AM.. Reason: Error in cW description (Thx bakunin for notice!)
 

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
FORMS(3)						   BSD Library Functions Manual 						  FORMS(3)

NAME
form_driver -- form library LIBRARY
Curses Form Library (libform, -lform) SYNOPSIS
#include <form.h> int form_driver(FORM *form, int request); DESCRIPTION
The form_driver() is the heart of the forms library, it takes commands in the request parameter that is either a request to the driver to perform some action or is a character to be inserted into the current field. The form driver will attempt to insert any printable character passed to it into the current field. This may or may not succeed depending on the state of the current field. If the character passed is not printable then the driver attempts to process it as a driver request. If the character passed is not a valid request then the driver will return an unknown command error. PARAMETERS
The forms driver recognizes the following requests: REQ_NEXT_PAGE Change to the next page in the form. REQ_PREV_PAGE Change to the previous page in the form. REQ_FIRST_PAGE Select the first page in the form. REQ_LAST_PAGE Go to the last page in the form. REQ_NEXT_FIELD Move to the next field in the form field array. REQ_PREV_FIELD Move to the previous field in the form field array. REQ_FIRST_FIELD Go to the first field in the form field array. REQ_LAST_FIELD Go to the last field in the form field array. REQ_SNEXT_FIELD Move to the next sorted field on the form. REQ_SPREV_FIELD Move to the previous sorted field on the form. REQ_SFIRST_FIELD Go to the first field in the sorted list. REQ_SLAST_FIELD Move to the last field in the sorted list. REQ_LEFT_FIELD Go one field to the left on the form page. REQ_RIGHT_FIELD Go one field to the right on the form page. REQ_UP_FIELD Go up one field on the form page. REQ_DOWN_FIELD Go down one field on the form page. REQ_NEXT_CHAR Move one char to the right within the field REQ_PREV_CHAR Move one char to the left within the current field. REQ_NEXT_LINE Go down one line in the current field. REQ_PREV_LINE Go up one line in the current field. REQ_NEXT_WORD Go forward one word in the current field REQ_PREV_WORD Go backward one word in the current field. REQ_BEG_FIELD Move the cursor to the beginning of the current field. REQ_END_FIELD Move the cursor to the end of the current field. REQ_BEG_LINE Move the cursor to the beginning of the line in the current field. REQ_END_LINE Move the cursor to the end of the line. REQ_LEFT_CHAR Move the cursor left one character REQ_RIGHT_CHAR Move the cursor right one character REQ_UP_CHAR Move the cursor up one line. REQ_DOWN_CHAR Move the cursor down one line. REQ_NEW_LINE Insert a new line at the current cursor position. REQ_INS_CHAR Insert a blank character at the current cursor position REQ_INS_LINE Open a blank line at the current cursor position. REQ_DEL_CHAR Delete the character at the current cursor position. REQ_DEL_PREV Delete the character to the left of the current cursor position. REQ_DEL_LINE Delete the current line. REQ_DEL_WORD Delete the word at the current cursor position. REQ_CLR_EOL Clear the field from the current cursor position to the end of the current line. REQ_CLR_EOF Clear the field from the current cursor position to the end of the field. REQ_CLR_FIELD Clear the field. REQ_OVL_MODE Enter overlay mode, characters added to the field will replace the ones already there. REQ_INS_MODE Enter insert mode, characters will be inserted at the current cursor position. Any characters to the right of the cursor will be moved right to accommodate the new characters. REQ_SCR_FLINE Scroll the field forward one line. REQ_SCR_BLINE Scroll the field backward one line. REQ_SCR_FPAGE Scroll the field forward one field page. REQ_SCR_BPAGE Scroll the field backward one field page. REQ_SCR_FHPAGE Scroll the field forward half one field page. REQ_SCR_BHPAGE Scroll the field backward half one field page. REQ_SCR_FCHAR Scroll the field horizontally forward one character REQ_SCR_BCHAR Scroll the field horizontally backward one character REQ_SCR_HFLINE Scroll the field horizontally forward one field line. REQ_SCR_HBLINE Scroll the field horizontally backward one field line. REQ_SCR_HFHALF Scroll the field horizontally forward half a field line. REQ_SCR_HBHALF Scroll the field horizontally backward half a field line. REQ_VALIDATION Request the contents of the current field be validated using any field validation function that has been set for the field. Normally, the field is validated before the current field changes. This request allows the current field to be validated. REQ_PREV_CHOICE Select the previous choice in an enumerated type field. REQ_NEXT_CHOICE Select the next choice in an enumerated type field. RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following error values: E_OK The function was successful. E_REQUEST_DENIED The forms driver request could not be fulfilled E_UNKNOWN_COMMAND The passed character is not a printable character and is not a valid forms driver request. E_BAD_ARGUMENT A bad argument was passed to the forms driver. E_INVALID_FIELD The form passed to the driver has no valid attached fields. E_NOT_POSTED The given form is not currently posted to the screen. E_BAD_STATE The forms driver was called from within an init or term function. E_INVALID_FIELD The character passed to the forms driver fails the character validation for the current field. SEE ALSO
curses(3), forms(3) NOTES
Field sorting is done by location of the field on the form page, the fields are sorted by position starting with the top-most, left-most field and progressing left to right. For the purposes of sorting, the fields top left corner is used as the sort criteria. The header <form.h> automatically includes both <curses.h> and <eti.h>. BSD
January 1, 2001 BSD
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy