Sponsored Content
Full Discussion: Vim tips and tricks
Top Forums UNIX for Beginners Questions & Answers Vim tips and tricks Post 302405557 by thillai_selvan on Friday 19th of March 2010 06:29:07 AM
Old 03-19-2010
Nice one!!!! To open a file inside vim.
steps:
Code:
  • Place the cursor on the file name.
  • Press keys gf on escape mode.
  • Now that file will be opened.
  • To return to the main file press [ctrl]+^.


To delete all the lines inside vim
Code:
  • On escape mode press gg now it will go to the first line
  • Then press dG.
  • Now it will delete from the first line to last line.

 

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
Tie::Handle(3pm)					 Perl Programmers Reference Guide					  Tie::Handle(3pm)

NAME
Tie::Handle - base class definitions for tied handles SYNOPSIS
package NewHandle; require Tie::Handle; @ISA = qw(Tie::Handle); sub READ { ... } # Provide a needed method sub TIEHANDLE { ... } # Overrides inherited method package main; tie *FH, 'NewHandle'; DESCRIPTION
This module provides some skeletal methods for handle-tying classes. See perltie for a list of the functions required in tying a handle to a package. The basic Tie::Handle package provides a "new" method, as well as methods "TIEHANDLE", "PRINT", "PRINTF" and "GETC". For developers wishing to write their own tied-handle classes, the methods are summarized below. The perltie section not only documents these, but has sample code as well: TIEHANDLE classname, LIST The method invoked by the command "tie *glob, classname". Associates a new glob instance with the specified class. "LIST" would represent additional arguments (along the lines of AnyDBM_File and compatriots) needed to complete the association. WRITE this, scalar, length, offset Write length bytes of data from scalar starting at offset. PRINT this, LIST Print the values in LIST PRINTF this, format, LIST Print the values in LIST using format READ this, scalar, length, offset Read length bytes of data into scalar starting at offset. READLINE this Read a single line GETC this Get a single character CLOSE this Close the handle OPEN this, filename (Re-)open the handle BINMODE this Specify content is binary EOF this Test for end of file. TELL this Return position in the file. SEEK this, offset, whence Position the file. Test for end of file. DESTROY this Free the storage associated with the tied handle referenced by this. This is rarely needed, as Perl manages its memory quite well. But the option exists, should a class wish to perform specific actions upon the destruction of an instance. MORE INFORMATION
The perltie section contains an example of tying handles. COMPATIBILITY
This version of Tie::Handle is neither related to nor compatible with the Tie::Handle (3.0) module available on CPAN. It was due to an accident that two modules with the same name appeared. The namespace clash has been cleared in favor of this module that comes with the perl core in September 2000 and accordingly the version number has been bumped up to 4.0. perl v5.18.2 2013-11-04 Tie::Handle(3pm)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy