add automatic vim sudo; remove example config file

This commit is contained in:
glmdev 2018-11-28 21:59:06 -06:00
parent 9ef6c03998
commit 3f9c3b61f2
3 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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:
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

View File

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