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.

75 questions
0
votes
1 answer

ex command line for delete frome specific line to specific line in list.txt bash script

I have a list.txt file with a couple of lines like: this line 1 this line 2 this line 3 this line 4 this line 5 this line 6 I want to delete from line 1 to line 2 with the ex command without using vim editor, I want use the ex command if that is…
0
votes
0 answers

Boost::ex.DI - Inject parametrized object

In our c++ application, we create many objects, like this: class Interface { public: static InterfaceImplementation Create(string s) { return InterfaceImplementation(s); } }; class User { public: User() { i =…
Moravas
  • 79
  • 6
0
votes
1 answer

How to automate an EX command in vim?

I have an EX command that I use pretty regularly to remove multi-line comments. :%s,/\*\_.\{-}\*/\n,,g Is there any way I can make it an EX alias (if such a thing exists?) in vimrc file? The goal would be something like: :nocomments Then it would…
Ted
  • 2,211
  • 2
  • 19
  • 27
0
votes
1 answer

ex (vim) adds an extra space character to empty lines

I would like to do some processing with ex (vim in ex/silent mode). There is however a strange behaviour if a line is empty. An extra space character is added to that line - even in binary mode. Is it possible to eliminate that? Check out: $ printf…
FERcsI
  • 388
  • 1
  • 10
0
votes
2 answers

Disable normal mode in ex (vim -e)

I have to use ex (or "vim -e"), because normal mode does not work in one of my environments. If I start ex, the following message appear "Entering Ex mode. Type "visual" to go to Normal mode.". Is it possible, to remove this unnecessary text (if I…
FERcsI
  • 388
  • 1
  • 10
0
votes
1 answer

Autodesk Forge: Cluster extension

I would like to add the cluster extension onto my forge application. I am able to add it in the forge VSCode extension when I am viewing the model through vscode, but I would like to add it to my main…
Poppy
  • 5
  • 2
0
votes
1 answer

How to get the method name and line number in Exception in ASP Core 5

I want to get the method name and line number when an error occur, I am using Core 5. try { //My code } catch (Exception ex) { _logger.LogError(ex, "Method Name / Line Number"); …
fiverbox.com
  • 119
  • 9
0
votes
0 answers

Using a shell script, How insert a line in a file which starts with a hash?

I'm trying to insert a line of text beginning with a hash in a text file using a shell script, using something like this: ex run <
Joseph Harvey
  • 83
  • 1
  • 5
0
votes
2 answers

Elixir piping output to an anonymous function

I'm currently learning elixir and i'm trying to print functions and their arity print = fn ({function , arity}) -> IO.puts "#{function}/#{arity}" end Enum.__info__(:functions) |> Enum.each(print.()) this returns **…
Cheeze
  • 46
  • 1
  • 8
0
votes
1 answer

Why is `vim -E` always exiting with non-zero exit code when using here-doc?

see the following session in dash: $ printf "foo\nbar\n" > testfile $ cat testfile foo bar $ vim -E testfile <<-EOS > 1 > s/foo/baz/ > x > EOS $ echo $? 1 $ cat testfile baz bar $ vim -E testfile +'1' +'s/baz/foo/' +'x' $ echo $? 0 $ I use ex-mode…
radlan
  • 2,393
  • 4
  • 33
  • 53
0
votes
1 answer

Unable to set excel VBA worksheet variable

I am trying to set a source worksheet variable to a target worksheet variable in another workbook(DataSource1.xlsx) with the purpose of eventually using it to read the target worksheet and perform some calculation but it gives me the subscript out…
Computernerd
  • 7,378
  • 18
  • 66
  • 95
0
votes
0 answers

Regular expression works in vim but fails in vim's ex mode

I am using the ex mode of vim in a script to perform vim regular expression and substitution on text files. ex $NAME <//g :%s/\[.\{-}\]//g :%s/ / /g :%s/^Contents$ :%s/^\d.*$ :%s/ (.\{1,4\})//g …
L Lansing
  • 63
  • 5
0
votes
2 answers

Multiline paste (ctrl-r) into ex or search|replace ^M with \r

When I'm yanking few lines and pasting it to command-line every new line is ^M instead \r. For example if I copy next two lines in visual mode (with command Vjy): line1 line2 and paste it in command-line (search) mode with command /" I…
undg
  • 787
  • 4
  • 14
0
votes
2 answers

Add Object to beginning of collection VBA

This may have been asked before but I can't seem to find it... I have a class I created and a collection for each object of that class, when I added these objects to my collection I did not give each item a key and rather let VBA do that…
Maldred
  • 1,074
  • 4
  • 11
  • 33
0
votes
1 answer

I am looking for a way to shorten this code by consolidating each "Case is" instant into one getting the case name from a variable

The purpose of the macro is to choose the correct data depending on the selected case in a dropdown menue on my "Recommendation" sheet. This is my code: Private Sub cmbNatCoList_Change() 'Define selected NatCo and variables for loop Dim NatCoList…
Tim
  • 161
  • 7
  • 24