Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 29, 2016, 12:06:52 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: The AVE  (Read 12646 times)

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #25 on: May 08, 2014, 01:25:32 AM »
And here's a short tutorial on find and replace:

http://www.thegeekst...nd-replace-examples/

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #26 on: May 08, 2014, 04:25:09 AM »
Thanks for that -- it's nice to have a series of concrete examples.  Below are their titles:

1. Substitute all occurrences of a text with another text in the whole file
2. Substitution of a text with another text within a single line
3. Substitution of a text with another text within a range of lines
4. Substitution of a text with another text by visual selection of lines
5. Substitution of a text with another text only the 1st X number of lines
6. Substitute only the whole word and not partial match
7. Substitute either word1 or word2 with a new word using regular expression
8. Interactive Find and Replace in Vim Editor
9. Substituting all lines with its line number.
10. Substituting special character with its equivalent value.
11. Alter sequence number in a numbered list while inserting a new item
12. Substituting the sentence beginnings with upper case. ( i.e title case the entire document ).

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #27 on: May 08, 2014, 04:31:26 AM »
I hadn't known that macros were available.

From phitsc's tutorial link, found a link to an article with a couple of examples:

1. Sequence number generation inside a file using Vim Macro
2. Repeat Vim Macro with different arguments
« Last Edit: May 08, 2014, 05:00:09 AM by ewemoa »

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,119
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #28 on: May 08, 2014, 05:27:56 AM »
And here's a short tutorial on find and replace:

http://www.thegeekst...nd-replace-examples/

Thanks.

1. Sequence number generation inside a file using Vim Macro
2. Repeat Vim Macro with different arguments

Didn't know that was possible, nice.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #29 on: May 21, 2014, 02:17:19 AM »
Is there some trick to using visual mode to select lines? It seems if you do the obvious of pressing v and then moving down using j, it selects the lines plus the first character on the next line. If I have to select the lines up to the last and then press $ to get the last line, that's just hopeless :huh:.

Edit: Ah, found it with google while fiddling with this post. Apparently you can use Shift-V to enter visual line mode.

This made it through my thick skull via:

  http://www.cs.swarthmore.edu/help/vim/selection.html

:)



I noticed there's column selection too - Ctrl-v IIUC.
« Last Edit: May 23, 2014, 11:28:26 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #30 on: May 23, 2014, 11:42:49 PM »
Came across the following 12 min introductory video (indirectly via a tip from 40hz):

  http://www.linuxvoice.com/learn-to-love-vim/

Covers -- among other things -- gotchas, saving settings, basic operations, etc.

Wish I had seen this before my first encounter with vi.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #31 on: June 06, 2014, 11:12:14 PM »
Was having a hard time reading comments (they were dark blue on a black background) while using vim.  The following was a quick help:

  http://unix.stackexchange.com/a/88880

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,119
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #32 on: June 07, 2014, 03:35:06 AM »
If you don't mind, I'd like to once again mention my favorite color scheme, Solarized :-*.

It has what I feel is a very pleasant relationship between colors. The light theme is easy to read in daylight here, and the dark theme is comfortable at night. The amazing thing is that both themes consist of the same sixteen colors, with only the monotones swapped.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #33 on: June 07, 2014, 07:04:03 AM »
Looks nice :)

Tried some instructions on getting it working in a terminal, but didn't succeed.  Would be nice if it becomes trivial to set up in a future version for vim!

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,119
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #34 on: June 22, 2014, 11:19:54 AM »
Some interesting criticism of Vim in Just Use Sublime Text (and HN discussion).

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #35 on: June 22, 2014, 01:52:53 PM »
Well, as long as the advice is to switch away from Vim, why Sublime Text?  There are SCADS of GUI text editors on the planet that have all sorts of nifty features, and they cost less than $70.

Besides, you miss out on these gems:

:help 42

:help!

:Ni!

 ;D

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #36 on: June 22, 2014, 08:11:32 PM »
Cute!

technical note
I found the second one behaved differently depending on context -- if you do it right after the first, it doesn't appear particularly interesting, but done immediately after starting up the editor (and in some other contexts), it gives the "desired" effect :)


phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #37 on: June 23, 2014, 01:51:53 AM »
Until now, I think I have fared very well with the combination of Sublime/Vintageous and Visual Studio/VsVim. I feel I get best of both worlds. E.g. I mostly do find&replace with the applications' built-in functionality instead of :s. But what I get from the respective VI-modes is what I miss most from the other apps, namely fast cursor movement / text manipulation within the current line!

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,119
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #38 on: June 27, 2014, 03:05:53 AM »
Nice looking Vim plug-in resource (via HN):

http://vimawesome.com/

Jibz

  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,119
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #39 on: July 02, 2014, 04:04:20 PM »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #40 on: October 01, 2014, 07:47:40 AM »
Came across:

vi-vim-cheat-sheet.gifThe AVE

via Graphical vi-vim Cheat Sheet and Tutorial

It's a multi-page thing, with pages 2 and onward focused on subsets -- some examples follow:

vi-vim-tutorial-1.gifThe AVE
vi-vim-tutorial-2.gifThe AVE
vi-vim-tutorial-3.gifThe AVE
« Last Edit: October 01, 2014, 10:14:11 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #41 on: October 14, 2014, 07:01:14 PM »
One of my favorite features in programs / applications is the split view...here's a page that discusses it for the program(s) under discussion:

  Split screen in vi



A brief summary:

One kind of split:
:split

Switching:
Control W Control W

Closing:
:q
« Last Edit: October 14, 2014, 07:52:53 PM by ewemoa »

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,214
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: The AVE
« Reply #42 on: October 14, 2014, 07:19:21 PM »
Just how appropriate is x16wda's sig?  8)

Quote
vi vi vi - editor of the beast
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #43 on: October 14, 2014, 07:55:01 PM »
Perhaps it's three times appropriate ;)

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #44 on: October 15, 2014, 01:48:15 AM »
Just how appropriate is x16wda's sig?  8)

Quote
vi vi vi - editor of the beast
Good one. Took me a few seconds.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #45 on: October 15, 2014, 06:16:23 AM »
Firefox users can gradually learn more vi-like commands via the likes of VimFx...AFAIU, it's not the only one of its kind.

Note: The key sequence to enable / disable was Control-Alt-v here -- not Shift-Alt-v as suggested via the link above.



Once accustomed to the key bindings, can even move on to the many browsers with vi-like key bindings :)
« Last Edit: October 15, 2014, 06:22:57 AM by ewemoa »

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #46 on: November 18, 2015, 07:04:13 AM »
A graphical 'cheat sheet' based on the QWERTY keyboard layout:

http://support.wasdk...s/1973584-vim-layout

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #47 on: November 19, 2015, 04:53:45 PM »
Hmm...is there a practical way to get one of those on to a physical keyboard?

phitsc

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 1,186
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #48 on: November 20, 2015, 01:34:58 AM »
On http://www.wasdkeyboards.com/ you can buy custom Cherry MX keycap sets. You can even create your own layout. I would assume that they have the VIM layout as a custom layout.
« Last Edit: November 20, 2015, 06:22:29 AM by phitsc »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,841
    • View Profile
    • Donate to Member
Re: The AVE
« Reply #49 on: November 20, 2015, 05:58:38 AM »
Ah...I see.  Thanks.  Hmm...I happen to have a suitable keyboard...