Merge branch 'main' of github.com:Donaldttt/dotfiles
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# SETUPLIB
|
||||||
|
|
||||||
|
a python library for writing cross-platform env setup script
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
class setup():
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _has_path(self, path):
|
||||||
|
"""
|
||||||
|
Check if path exists(is file or directory)
|
||||||
|
"""
|
||||||
|
return os.path.exists(path)
|
||||||
|
|
||||||
|
def _is_file(self, path):
|
||||||
|
"""
|
||||||
|
Check if path is file
|
||||||
|
"""
|
||||||
|
return os.path.isfile(path)
|
||||||
|
|
||||||
|
def _is_dir(self, path):
|
||||||
|
"""
|
||||||
|
Check if path is directory
|
||||||
|
"""
|
||||||
|
return os.path.isdir(path)
|
||||||
|
|
||||||
|
|
||||||
@@ -164,6 +164,8 @@ endfunc
|
|||||||
|
|
||||||
function! options#init()
|
function! options#init()
|
||||||
call options#preSet()
|
call options#preSet()
|
||||||
command! -nargs=0 Options call options#fzf_options()
|
if !has('nvim')
|
||||||
nnoremap <silent> <leader>fo :Options<CR>
|
command! -nargs=0 Options call options#fzf_options()
|
||||||
|
nnoremap <silent> <leader>fo :Options<CR>
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user