Sponsored Content
Full Discussion: VI editor,column postion
Top Forums Shell Programming and Scripting VI editor,column postion Post 302252279 by vijay_0209 on Wednesday 29th of October 2008 06:52:35 AM
Old 10-29-2008
VI editor,column postion

In VI editor ctrl + g is used indicate the line number on which the cursor is placed...similarly is there a way to determine the column number of the cursor position..?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep at a given postion

All, I need to grep for a value between particular positions: Eg: ACME CORPORATION 3 213.89 I need to look out for the value 3 betwen postions 20 and 26. Any ideas. Thanks KP. (3 Replies)
Discussion started by: kingofprussia
3 Replies

2. Programming

need info on current curser postion.

Hi All, I have written the below code to know the current curser position. The problem with this code is - it gives me window size properly but whn it comes to current curser position then it gives (0,0) as x,y co-ordinate eventhough my curser is somewhere middle on command line interface. ... (0 Replies)
Discussion started by: swap007
0 Replies

3. Shell Programming and Scripting

Vi editor, copy one column?

This is an vi editor question. I do not know is this a right place to ask this question or not? I have a file with the following contents, 10 11 20 21 30 31 I want to copy first column that is 10,20,30 after second column, so that output will look like the following, 10 11 10 20 21 20... (3 Replies)
Discussion started by: MeetP
3 Replies

4. Solaris

How to set VI editor column size on Solaris?

I am setting the size using "stty columns 120" . But I still get the prompt saying "terminal too wide " when I am in vi. is there any time limit for this setting? how to set the column size to 120 permanently? Thanks in advance, Devi (4 Replies)
Discussion started by: pvkdevi
4 Replies

5. UNIX for Dummies Questions & Answers

Delete a specific column using vi editor?

Hello Experts, I'm a newbie so please excuse any wrong doings. I have a file that looks like this. abc def ghi jkl mno def abc ghi mno jkl ghi def mno jkl abc I would like the file to look like this abc def ghi jklmno def abc ghi mnojkl ghi def mno jklabc in other... (3 Replies)
Discussion started by: fnebiolo
3 Replies

6. UNIX for Dummies Questions & Answers

how to get index/postion of a string?

Hi, I have a string like the following: /db1/data/GLIDER/SYSTEM.dbf need to find the postion where "SYSTEM.dbf" starts, so I tried: LOCATION=/db1/data/GLIDER/SYSTEM.dbf $ expr index $LOCATION SYSTEM expr: syntax error $ expr index "$LOCATION" SYSTEM expr: syntax error ... (5 Replies)
Discussion started by: seafan
5 Replies

7. UNIX for Dummies Questions & Answers

Removing 2nd Column in Vi Editor

I have text like this M83-306 132 797 M83-312 145 685 M83-315 321 479 M83-319 654 193 M83-350 556 1184 M83-303 222 199 and I want to make it like this M83-306 797 M83-312 685 M83-315 ... (9 Replies)
Discussion started by: muhnandap
9 Replies

8. UNIX for Dummies Questions & Answers

Swapping column in vi editor

is there any command in vi editor to turn this 986.000 4.026.000 775.328.625 9.319.003.000 986.000 4.036.000 775.328.625 9.318.803.000 986.000 4.046.000 775.328.625 9.318.603.000 986.000 4.056.000 775.328.625 9.318.403.000 become this... (5 Replies)
Discussion started by: muhnandap
5 Replies

9. Shell Programming and Scripting

Print column postion

Hi, I am using the below code for printing the column position of a particular string nawk -v srch="DName" -F '\t' '{for(j=1; j<=NF; j++) { if($j==srch) print j } exit }' input_file.txt The above code prints the column position of the input string DName (that is 1) Now the problem is,... (7 Replies)
Discussion started by: sampoorna
7 Replies

10. UNIX for Dummies Questions & Answers

Remove a column using vi editor

How do i remove a column using vi editor Assuming the file to be of format 1: 010 0xad45 sp1 - 11:29:51.498583949 500249144 Event1 rst bcfe jhv rgc 456: 010 0xadb sp2 - 11:29:51.498600605 4464 Event0abcrd adabc aasd 45: 010 0x10 sp0 - 11:29:51.498614165 13560 Back adxca... (6 Replies)
Discussion started by: sp0
6 Replies
curs_alecompat(3CURSES) 				     Curses Library Functions					   curs_alecompat(3CURSES)

NAME
curs_alecompat, movenextch, wmovenextch, moveprevch, wmoveprevch, adjcurspos, wadjcurspos - these functions are added to ALE curses library for moving the cursor by character. SYNOPSIS
cc [ flag ... ] file ... -lcurses [ library .. ] #include <curses.h> int movenextch(void); int wmovenextch(WINDOW *win); int moveprevch(void); int wmoveprevch(WINDOW *win); int adjcurspos(void); int wadjcurspos(WINDOW *win); DESCRIPTION
movenextch() and wmovenextch() move the cursor to the next character to the right. If the next character is a multicolumn character, the cursor is positioned on the first (left-most) column of that character. The new cursor position will be on the next character, even if the cursor was originally positioned on the left-most column of a multicolumn character. Note that the simple cursor increment (++x) does not guarantee movement to the next character, if the cursor was originally positioned on a multicolumn character. getyx(3CURSES) can be used to find the new position. moveprevc() and wmoveprevch() routines are the opposite of movenextch() and wmovenextch(), moving the cursor to the left-most column of the previous character. adjcurspos() and wadjcurspos() move the cursor to the first(left-most) column of the multicolumn character that the cursor is presently on. If the cursor is already on the first column, or if the cursor is on a single-column character, these routines will have no effect. RETURN VALUE
All routines return the integer ERR upon failure and an integer value other than ERR upon successful completion. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), getyx(3CURSES), attributes(5) NOTES
The header file <curses.h> automatically includes the header files <stdio.h> , <unctrl.h> and <widec.h>. Note that movenextch(), moveprevch(), and adjcurspos() may be macros. SunOS 5.11 31 Dec 1996 curs_alecompat(3CURSES)
All times are GMT -4. The time now is 05:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy