Sponsored Content
Top Forums Programming Open Source What editor does everyone use? Post 302998079 by cb88 on Wednesday 24th of May 2017 10:46:20 PM
Old 05-24-2017
Quote:
Originally Posted by Corona688
vi is difficult to avoid sometimes. You may never love it the way people who learned on it did; it's very much not a 21st-century program, designed for printing terminals and a keyboard which no longer exists. But it's very useful to know the basics, because there's a vim or a vi everywhere.

vi-hater's cheat sheet for vi:
  • i: Stop beeping at me and enter writing mode you stupid program
  • esc-:-w-q-enter: Save and quit
  • esc-:-q-!-enter: Quit without saving
  • esc-d-d: Delete a line because backspace isn't good enough for you
  • esc-esc-esc: what in the world are you doing now, quit it, stop doing that
Haha, yes ... The only time I use vi is when installing NetBSD occasionaly on some of my old hardware for kicks. But it is ubiquitous... its hard to find a Nix install without some version of it. Also that keyboard has Ctrl in the right place... non the abominable caps lock key.

nano or pico are the go to console editors for me... and I have strangely fond memories of edit in a DOS prompt, which I suppose is part of why I like the minimum profit editor...
http://triptico.com/img/mp-5-curses.png

I've been using the atom editor (quite bloaty honestly)... but it integrates pretty decently with a dozen plus microcontroller toolchains as well as libraries for tons of things like the little LoRa boards I have been experimenting with.
 

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
Perl::Critic::Policy::RegularExpressions::ProhibitCompleUsereContributed Perl DPerl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes(3)

NAME
Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes - Split long regexps into smaller "qr//" chunks. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Big regexps are hard to read, perhaps even the hardest part of Perl. A good practice to write digestible chunks of regexp and put them together. This policy flags any regexp that is longer than "N" characters, where "N" is a configurable value that defaults to 60. If the regexp uses the "x" flag, then the length is computed after parsing out any comments or whitespace. Unfortunately the use of descriptive (and therefore longish) variable names can cause regexps to be in violation of this policy, so interpolated variables are counted as 4 characters no matter how long their names actually are. CASE STUDY
As an example, look at the regexp used to match email addresses in Email::Valid::Loose (tweaked lightly to wrap for POD) (?x-ism:(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[] 00-37x80-xff])|"[^\x80-xff 15"]*(?:\[^x80-xff][^\x80-xff 15 "]*)*")(?:(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[ ]00-37x80-xff])|"[^\x80-xff 15"]*(?:\[^x80-xff][^\x80-xff 15"]*)*")|.)*@(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@, ;:".\[]00-37x80-xff])|[(?:[^\x80-xff 15[]]|\[^x80-xff])*] )(?:.(?:[^(40)<>@,;:".\[]00-37x80-xff]+(?![^(40)<>@,;:".\[]00 -37x80-xff])|[(?:[^\x80-xff 15[]]|\[^x80-xff])*]))*) which is constructed from the following code: my $esc = '\\'; my $period = '.'; my $space = '40'; my $open_br = '['; my $close_br = ']'; my $nonASCII = 'x80-xff'; my $ctrl = '00-37'; my $cr_list = ' 15'; my $qtext = qq/[^$esc$nonASCII$cr_list"]/; # " my $dtext = qq/[^$esc$nonASCII$cr_list$open_br$close_br]/; my $quoted_pair = qq<$esc>.qq<[^$nonASCII]>; my $atom_char = qq/[^($space)<>@,;:".$esc$open_br$close_br$ctrl$nonASCII]/;# " my $atom = qq<$atom_char+(?!$atom_char)>; my $quoted_str = qq<"$qtext*(?:$quoted_pair$qtext*)*">; # " my $word = qq<(?:$atom|$quoted_str)>; my $domain_ref = $atom; my $domain_lit = qq<$open_br(?:$dtext|$quoted_pair)*$close_br>; my $sub_domain = qq<(?:$domain_ref|$domain_lit)>; my $domain = qq<$sub_domain(?:$period$sub_domain)*>; my $local_part = qq<$word(?:$word|$period)*>; # This part is modified $Addr_spec_re = qr<$local_part@$domain>; If you read the code from bottom to top, it is quite readable. And, you can even see the one violation of RFC822 that Tatsuhiko Miyagawa deliberately put into Email::Valid::Loose to allow periods. Look for the "|." in the upper regexp to see that same deviation. One could certainly argue that the top regexp could be re-written more legibly with "m//x" and comments. But the bottom version is self- documenting and, for example, doesn't repeat "x80-xff" 18 times. Furthermore, it's much easier to compare the second version against the source BNF grammar in RFC 822 to judge whether the implementation is sound even before running tests. CONFIGURATION
This policy allows regexps up to "N" characters long, where "N" defaults to 60. You can override this to set it to a different number with the "max_characters" setting. To do this, put entries in a .perlcriticrc file like this: [RegularExpressions::ProhibitComplexRegexes] max_characters = 40 CREDITS
Initial development of this policy was supported by a grant from the Perl Foundation. AUTHOR
Chris Dolan <cdolan@cpan.org> COPYRIGHT
Copyright (c) 2007-2011 Chris Dolan. Many rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module perl v5.16.3 2014-06-09 Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes(3)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy