vi Questions

4

Solved

I have a file with 4 million of lines, every line ends with the char $, but I mistakenly add a new line after the the line delimiter while scraping a website, so right now it is looking like this: ...
Duckbill asked 13/3, 2014 at 0:16

4

Solved

Say I want to edit the following line: var myVar = "I am a string!"; So that it looks like this: var myVar = "I am a string!"; Is there a movement that goes to the end of the previous line?...
Stibnite asked 27/5, 2015 at 20:12

3

I am trying to parse a giant log file using node.js, the file does not seem to get '\n' but when I do set list in vi it shows me '$" at the end of every line, does anyone know what that is. I means...
Plumbaginaceous asked 15/7, 2011 at 7:15

5

Solved

I just got knocked down after our server has been updated from Debian 4 to 5. We switched to UTF-8 environment and now we have problems getting the text printed correctly on the browser, because al...
Psf asked 22/2, 2010 at 15:8

9

Solved

How do I remove the first 5 characters in each line in a text file? I have a file like this: 4 Alabama 4 Alaska 4 Arizona 4 Arkansas 4 California 54 Can 8 Carolina 4 Colorado 4 Connectic...
Papst asked 10/2, 2015 at 0:7

2

Solved

Is it possible in Vim to have my editor (when editing .c and .h files), show via listchars, a special character only for leading space characters? I found a separate post that noted, as of version...
Candless asked 8/11, 2016 at 23:40

10

my autoindent is not working, any diagnostic tests to figure it out? my ":set" is: :set --- Options --- cindent laststatus=2 scroll=17 tabstop=4 window=36 filetype=cpp number smartindent tt...
Buckman asked 15/10, 2010 at 0:29

5

How do I go to the beginning of the line in vim editor in normal mode? Is it possible to using my Home key on keyboard on Linux?
Explore asked 7/3, 2017 at 17:58

16

I have installed docker on my host virtual machine. And now want to create a file using vi. But it's showing me an error: bash: vi: command not found
Scattering asked 20/7, 2015 at 11:55

8

Solved

Is there a way to split a window inside Vi/Vim so that one window will be a terminal? P.S. Solutions like installing new text editors and such will not help me.
Fugacious asked 12/7, 2016 at 13:6

21

Solved

I am trying to edit sources.list using vi editor but getting the following error while saving the file: /etc/apt/sources.list" E212: Can't open file for writing
Omnirange asked 24/11, 2011 at 7:12

16

Solved

I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?
Lahdidah asked 19/9, 2008 at 21:19

3

Newbie to vi / vim, I normally use pico but using a locked down box (for now) that only has these 2 editors. I am having trouble getting it to save a file or even just quit. I see others having th...
Counterfoil asked 15/11, 2017 at 19:4

5

Solved

Say I have the following python array literal: def f(): arr = [ 1, 2, 3 ] I want to delete everything in the brackets so that it becomes this: def f(): arr = [] How can I do that wi...
Mathilda asked 24/10, 2016 at 0:7

13

Solved

My arrow keys don't work in vi in insert mode at home, they just each insert a newline and a capital letter, like 'A'. Is there a way to fix that?
Bootleg asked 1/5, 2009 at 19:55

6

Solved

What is the easiest way to replace all occurrences of string_a with string_b while at the same time changing anything that was already string_b into string_a? My current method is as follows: :s/s...
Assent asked 26/8, 2010 at 19:1

6

Solved

usually I deal with files that look like this: 0.98 3.45 2.45 3.90 . . . 4.56 8.45 lets say with 100 lines. I would like to get something like this: 1 0.98 3.45 2 2.45 3.90 . . . 100 4.56 8.45 ...
Lashonlashond asked 13/8, 2013 at 21:52

2

Solved

Suppose you have this text: name1 = "John"; age1 = 41; name2 = "Jane"; age2 = 32; name3 = "Mike"; age3 = 36; ... and you want to split each line into two lines to give a result like this: name1...
Dachau asked 16/7, 2013 at 2:28

6

Solved

Is there a way to place a character at a specific line in vim, even if the line is short? For example, I'm contributing to a project which has a comment block style which is 79 columns wide, with ...
Criseldacrisey asked 18/1, 2013 at 14:16

9

Solved

I sometimes open a read-only file in vi, forgetting to do chmod +w before opening it. Is there way to change the file from within vi? Something like !r chmod +w [filename]? Is there a shortcut to...
Cerography asked 22/10, 2009 at 11:41

5

Solved

If I use :lopen, Vim opens the quickfix window, and if I use :lcl on the window with errors (or the quickfix window itself), it closes it. What I want to do in my .vimrc is to create a map that o...
Qualmish asked 25/6, 2012 at 22:38

14

Need help. I have been editing a text file in vi , and i was able to save the changes before but now i am getting the above error whenever i am typing command to save the file. Please help . ...
Barnardo asked 8/12, 2011 at 8:33

23

Solved

How should I rename my current file in Vim? For example: I am editing person.html_erb_spec.rb I would like it renamed to person.haml_spec.rb I would like to continue editing person.haml_spec.rb ...
Osage asked 30/7, 2009 at 8:46

2

Solved

I know how to use VI to find lines longer than a certain number of characters: /\%>80v.\+ But how do I search for lines shorter than a certain number of characters?
vi
Boutwell asked 11/5, 2011 at 14:28

7

Solved

Are there any shortcuts to move to the next enclosing brackets. For ex: int func() { if(true) {//this point for(int i=0;i<10;i++) {//need to jump from here to //blah blah blah } } }...
Assyriology asked 2/10, 2009 at 14:26

© 2022 - 2024 — McMap. All rights reserved.