Eric Leenman wrote:
Hi
Hi!
How to modify code so that only one space is between two characters or
words?
You could use a Search/Replace on the full text. This does end up
modifying your base text, so be sure to only use it on modifiable buffers.
For example:
- all lines containing the char : followed with zero or more then one
space(s) and then in
should become: <untouched what is here>: in(<untouched what is here>
aaa : in std_logic;
bb : in std_logic_vector(7 downto 0);
:%s/: \+in/: in/g
or, if you want to overwrite all whitespace (spaces, tabs, other
unprintable characters), use:
:%s/:\s\+in/: in/g
- all lines containing the word process followed with zero or more
then one space(s) and then a (
should become: <untouched what is here>process (<untouched what is here>
process (clk,reset)
process (clk27)
proc_one : proccess (a,b,c)
:%s/process \+(/process (/g
or for all types of whitespace:
:%s/process\s\+(/process (/g
Rgds,
Eric
HTH
Albie
--
To have died once is enough. -- Publius Vergilius Maro (Virgil)