summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorYigit Sever2021-11-18 19:47:43 +0300
committerYigit Sever2021-11-18 19:47:43 +0300
commitb8523b178794d7bcc71ae80c306c28b377e978e0 (patch)
tree7ee15bda8459e898f1ebefac47f0b8bbd69821f4 /.local
parentfebc6f258b11d0342a64921b95ef64080347a596 (diff)
downloaddotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.tar.gz
dotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.tar.bz2
dotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.zip
cmdfmt: textwidth may be 0 from vim
diffstat (limited to '.local')
-rwxr-xr-x.local/bin/cmdfmt5
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/bin/cmdfmt b/.local/bin/cmdfmt
index 37218d7..634e9c6 100755
--- a/.local/bin/cmdfmt
+++ b/.local/bin/cmdfmt
@@ -3,6 +3,11 @@
3use strict; 3use strict;
4 4
5my $textwidth = $ARGV[0] // 80; 5my $textwidth = $ARGV[0] // 80;
6
7if ($textwidth == 0) {
8 $textwidth = 80;
9}
10
6# TODO: get tabstop from vim as well <17-11-21, yigit> # 11# TODO: get tabstop from vim as well <17-11-21, yigit> #
7my $tabstop = ' ' x 4; 12my $tabstop = ' ' x 4;
8 13