add automatic vim sudo; remove example config file

master
glmdev 6 years ago
parent 9ef6c03998
commit 3f9c3b61f2

@ -18,5 +18,4 @@ This project is currently a work-in-progress. Only the fish shell is supported a
- Double wh does an la, not ls
- Git Repo detection for ls
- Clipboard functionality
- sudo vim
- Binary File MIME Types

@ -141,7 +141,10 @@ elif ( (not active and len(sys.argv) == 2) or (active and len(sys.argv) == 3) ):
if ( is_binary_file(path) ):
print("echo Binary file.")
else:
print(edit_file+" "+path)
if ( os.access(path, os.W_OK) ):
print(edit_file+" "+path)
else:
print("sudo "+edit_file+" "+path)
else:
# check if file is a path program, then list using which/man on active

@ -1,5 +0,0 @@
[DEFAULT]
print_file = cat
pretty_print_file = less -R
edit_file = vim
list_directory = ls --color=auto
Loading…
Cancel
Save