Hello,
I have a file with :
# PATH=$(echo -n $PATH | \
# awk -v RS=: -v ORS=: '!x[$0]++' | \
# sed "s/\(.*\).\{1\}/\1/")
# PS1='\h\$ '
PS1=k$\
if [ ! -d /tmp/alpha ]; then
mkdir /tmp/alpha
chmod 0700 /tmp/alpha
The command :
:%!unexpand -t4
unexpands correctly those lines (gives me 2 tabs after the '#' character):
# awk -v RS=: -v ORS=: '!x[$0]++' | \
# sed "s/\(.*\).\{1\}/\1/")
but does not unexpands those lines (still 8 spaces):
mkdir /tmp/alpha
chmod 0700 /tmp/alpha
I also tested with
:%!unexpand -a -t4
I have no such problems with vim, nvi (provided by voidlinux) and in CLI (unexpand -t4 file.txt > alpha.txt ; alpha.txt has the correct tabs).
Thank you and keep up the great job!
EDIT
I had set expandtab in $HOME/.nexrc when I did my tests.
If I disable this option, then :%!unexpand -t4 works as expected.
I can live with that, one just has to have it in mind.
Hello,
I have a file with :
The command :
:%!unexpand -t4unexpands correctly those lines (gives me 2 tabs after the '#' character):
but does not unexpands those lines (still 8 spaces):
I also tested with
:%!unexpand -a -t4I have no such problems with vim, nvi (provided by voidlinux) and in CLI (unexpand -t4 file.txt > alpha.txt ; alpha.txt has the correct tabs).
Thank you and keep up the great job!
EDIT
I had
set expandtabin $HOME/.nexrc when I did my tests.If I disable this option, then
:%!unexpand -t4works as expected.I can live with that, one just has to have it in mind.