Sponsored Content
Top Forums Programming Open Source What editor does everyone use? Post 75718 by Neo on Tuesday 21st of June 2005 03:14:19 PM
Old 06-21-2005
I use VI and VIM on the Linux and Unix command line. I've never used anything consistently but VIM and VIM in 18 years.

Neo
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vi editor ?

Hello everybody, My question is: how to add /tmp/work at the end of line in vi editor. my file looks like: cp file1 cp file2 cp file3 **** I need to add " /tmp/work" at the end of each line. I tried this :%s/$/" /tmp/work" and this :%s/$/\ /tmp/work\/ but it does not work. (2 Replies)
Discussion started by: billy5
2 Replies

2. HP-UX

instead VI editor - which one?

I'd like to find some editor for HP-UX, something like notepad, but not VI editor. Can someone have some ideas which one? thx (6 Replies)
Discussion started by: diamond
6 Replies

3. UNIX for Advanced & Expert Users

vi editor

Hi, how can I add at the begining and at the end of all of the lines of my text file in VI editor ? Many thanks before. for exemple if in my file i have line 1 line 2 I want to have : start line 1 end start line 2 end (3 Replies)
Discussion started by: alain123456
3 Replies

4. UNIX Desktop Questions & Answers

best editor

We work on AIX 5L We use vi as text editor (only scripts to create and modifiy). What do you think of emacs ? Where can I find it ? Do you know better text editor for scripts ? Thank you for all answers. (1 Reply)
Discussion started by: annemar
1 Replies

5. HP-UX

vi editor

I am new in hp ux and I want work with vi editor, but in hp ux vi editor the backspaes and del keys doesn't work. how can I enable them. thanks (3 Replies)
Discussion started by: hkoolivand
3 Replies

6. UNIX for Dummies Questions & Answers

Pasting text in VI editor from a different editor

Hi, I knw its a silly question, but am a newbie to 'vi' editor. I'm forced to use this, hence kindly help me with this question. How can i paste a chunk 'copied from' a different editor(gedit) in 'vi editor'? As i see, p & P options does work only within 'vi'. (10 Replies)
Discussion started by: harishmitty
10 Replies

7. Shell Programming and Scripting

set EDITOR=vi -> default editor not setting for cron tab

Hi All, I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by set EDITOR=vi it does not open a vi editor , rather it do as below..... ///////////////////////////////////////////////////// $ set... (6 Replies)
Discussion started by: aarora_98
6 Replies

8. Solaris

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :Licen

Epic Editor was not able to obtain a license for your use. Feature Epic Editor :License server is down (1 Reply)
Discussion started by: durgaprasadr13
1 Replies

9. Shell Programming and Scripting

About vi editor

How can ` character be printed on vi editor ? empl_id=`echo $line | awk ' { print $1; } '` (2 Replies)
Discussion started by: senem
2 Replies

10. Shell Programming and Scripting

Not able to use @ in VI editor

Hello All, Need one Help for one issue. I am using a French Keyboard, so @ sign is on key 0 and i have to use right Alt + 0 to print it. It is working everywhere but not inside Vi editor. I can type @ in shell, in notepad. But inside Vi editor it is not working, another problem is that if... (2 Replies)
Discussion started by: yadavricky
2 Replies
Text::FindIndent(3pm)					User Contributed Perl Documentation				     Text::FindIndent(3pm)

NAME
Text::FindIndent - Heuristically determine the indent style SYNOPSIS
use Text::FindIndent; my $indentation_type = Text::FindIndent->parse($text, skip_pod => 1); if ($indentation_type =~ /^s(d+)/) { print "Indentation with $1 spaces "; } elsif ($indentation_type =~ /^t(d+)/) { print "Indentation with tabs, a tab should indent by $1 characters "; } elsif ($indentation_type =~ /^m(d+)/) { print "Indentation with $1 characters in tab/space mixed mode "; } else { print "Indentation style unknown "; } DESCRIPTION
This is a module that attempts to intuit the underlying indent "policy" for a text file (most likely a source code file). METHODS
parse The class method "parse" tries to determine the indentation style of the given piece of text (which must start at a new line and can be passed in either as a string or as a reference to a scalar containing the string). Returns a letter followed by a number. If the letter is "s", then the text is most likely indented with spaces. The number indicates the number of spaces used for indentation. A "t" indicates tabs. The number after the "t" indicates the number characters each level of indentation corresponds to. A "u" indicates that the indenation style could not be determined. Finally, an "m" followed by a number means that this many characters are used for each indentation level, but the indentation is an arbitrary number of tabs followed by 0-7 spaces. This can happen if your editor is stupid enough to do smart indentation/whitespace compression. (I.e. replaces all indentations many tabs as possible but leaves the rest as spaces.) The function supports parsing of "vim" modelines. Those settings override the heuristics. The modeline's options that are recognized are "sts"/"softtabstob", "et"/"noet"/"expandtabs"/"noexpandtabs", and "ts"/"tabstop". Similarly, parsing of "emacs" Local Variables is somewhat supported. "parse" use explicit settings to override the heuristics but uses style settings only as a fallback. The following options are recognized: "tab-width", "indent-tabs-mode", "c-basic-offset", and "style". There is one named option that you can pass to "parse()": "skip_pod". When set to true, any section of POD (see perlpod) will be ignored for indentation finding. This is because verbatim paragraphs and examples embedded in POD or quite often indented differently from normal Perl code around the POD section. Defaults to false. Example: my $mode = Text::FindIndent->parse($text, skip_pod => 1); to_vim_commands A class method that converts the output of "parse($text)" into a series of vi(m) commands that will configure vim to use the detected indentation setting. Returns zero (failure) or more lines of text that are suitable for passing to "VIM::DoCommand()" one by one. As a convenience, if the argument to "to_vim_commands" doesn't look like the output of "parse", it is redirected to "parse" first. To use this, you can put the following line in your .vimrc if your vim has Perl support. Suggestions on how to do this in a more elegant way are welcome. The code should be on one line but is broken up for displaying: map <F5> <Esc> :perl use Text::FindIndent;VIM::DoCommand($_) for Text::FindIndent->to_vim_commands(join " ", $curbuf->Get(1..$curbuf->Count()));<CR> (Patches to implement the equivalent for emacs would be welcome as well.) SUPPORT
Bugs should be reported via the CPAN bug tracker at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Text-FindIndent> For other issues, contact the author. AUTHOR
Steffen Mueller <smueller@cpan.org> Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2008 - 2010 Steffen Mueller. Copyright 2008 - 2010 Adam Kennedy, This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2011-01-04 Text::FindIndent(3pm)
All times are GMT -4. The time now is 08:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy