Questions tagged [ex]

ex is a line editor which serves as the foundation of vi. ex commands work on the current line or on a range of lines in a file. ex is invoked using the colon syntax within vi, and can be invoked on its own from the shell.

70 questions
0
votes
4 answers

Copying pattern from set of lines with Vim's Ex mode

I am tidying up my vimrc. Mission: - Copy content inside single-quotes (and preferably after the slash) - Paste them below line 1 1: Name: 2: 3: Bundle 'tpope/vim-rails' 4: Bundle 'tpope/vim-endwise' 5: Bundle 'mileszs/ack.vim' 6: Bundle…
krystah
  • 3,136
  • 1
  • 22
  • 38
0
votes
1 answer

Execute multiple ex commands in bash shell script

I want to execute 2 ex commands using a shell script. For example: on a file called test Print lines containing .jsp. :/.jsp/ p Add * to the beginning of those lines. :s/^/\*/ How can I make a shell script that executes them both? I've tried a…
0
votes
1 answer

vim: how to create custom command to indent and then go to next line

Okay so I want to create a custom command (and place it in my .vimrc file using the :command command, if possible) which basically indents the line which the cursor is on and then moves to the next line. Any idea on how to do this?
SilentDev
  • 15,207
  • 26
  • 87
  • 180
0
votes
2 answers

How to send the selected visual block in ex command line?

I want to send a visual block as a stand-in for a command, such as :!echo < something from the visual block How could I do this in vim?
steveyang
  • 8,588
  • 7
  • 48
  • 75
0
votes
2 answers

Regular expression for IP Address

I need to be able to search through a log and grab IP addresses that were logged. An example log line would look like: [2012-06-05 11:59:52] NOTICE[14369] chan_sip.c: Registration from '' failed for 'yy.yy.yy.yyy' - No matching peer found I need…
eherr9633
  • 47
  • 8
-1
votes
1 answer

Excel VBA: Cannot perform auto search on website

Recently I am learning to use excel macro to search on a website. I've read several forum threads and I came up with the code below. However, error appears when I reach the row SearchBox(0).Value = SearchString I tried to remove the (0) but another…
LLC
  • 15
  • 4
-1
votes
1 answer

How to replace quotes inside a quoted field of a CSV file using a one-liner bash command?

I have a file like this: col1×col2×col3 12×"Some field with "quotes" inside it"×"Some field without quotes inside" And I would like to replace the interior double quotes with single quotes so the result will look like this: col1×col2×col3 12×"Some…
-1
votes
2 answers

Running .exe directly & through Shell VBA returning different results

When I click directly in the .exe file "PrintUsers.exe", the output is correct. But when I do that through VBA using Shell the result is different. It tries to find the text file in another directory. Why? See figure: SOLUTION: I am now using:…
dmiranda
  • 3
  • 5
-1
votes
1 answer

Excel 2013 - "too many arguments" message to IFAND formula

I am creating a decision tool where yes/no responses will trigger a follow up question or decision. I created a formula with 13 arguments where each IF has two AND conditions (if no - it is true, if yes - It is false). I am no expert and tried to…
Sonia
  • 9
  • 4
-1
votes
2 answers

vi moving lines and words

I am taking a UNIX class, and unfortunately my teacher is not the greatest..So I am in need of your help! I have a file named file1 with the text: Roger Mancuso Xavier Allen Paul Bibbens What our teacher wants us to do is with a single command…
nom_nutella
  • 171
  • 1
  • 10
1 2 3 4
5