
set scrolloff 10      # space on top and bottom of screen
set icons true          # show icons next to files
set period 1          # interval to check for directory updates
set hidden true         # show hidden files by default
set incsearch o       # jump to first match after each keystroke in search
set dircounts true      # show number of items in directory instead of sie
set info "size"       # list directory information on the right
set sortby "natural"  # don't sort files in any special way
set preview true        # preview file on the right pane
# set drawbox on        # draw a border around all panes
set globsearch false
set mouse true
set number true
set incsearch true
set preview true
set shell powershell
# set colors on
set ratios '1:2:3'  # ratio of pane widths
set ifs "\n"

# set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
# see more at https://git.lmburns.com/dotfiles-mac/file/.config/lf/lC:\Users\alex\AppData\Roaming\npmC:\Users\alex\AppData\Roaming\npmC:\Users\alex\AppData\Roaming\npmC:\Users\alex\AppData\Roaming\npmC:\Users\alex\AppData\Roaming\npmC:\Users\alex\AppData\Roaming\npmfrc.html
# see this: https://github.com/ahrm/dotfiles/tree/main/lf-windows/lf_scripts
# https://github.com/NikitaIvanovV/ctpv

# also see pistol file previewer.
# set shell pwsh  # too slow.
# set ignorecase true
# see:
# https://github.com/gokcehan/lf/wiki/Integrations#ripgrep
# https://github.com/gokcehan/lf/wiki/Integrations#fzf
# https://github.com/junegunn/fzf/blob/master/ADVANCED.md#ripgrep-integration


# windows defaults
#           %OPENER%  start
#           %EDITOR%  notepad
#           %PAGER%   more
#           %SHELL%   cmd

# ============================ KEY BINDINGS ============================================
# avoid using confusing keys that are already bound to other functions by other programs, e.g. the console itself, like ctrl+c
# default reference: https://pkg.go.dev/github.com/gokcehan/lf

# key bindings
map v  # default is invert
map V invert
map p
map x
map c
map v
map r
map D $diskonaut $f
map K $kondo $f
map r reload


# e edit
map e  # edit modal key.
map en $nano $f
map el $pwsh -File $env:USERPROFILE/.local/bin/lvim.ps1 -- $f
map ev $nvim $f
map ec $code $f
map ep $& 'C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2022.2\bin\pycharm.exe' $f
map o  $start $f
map <enter> open


# w shells
map w
map ww $powershell
map wp $pwsh
map wc $croshell.ps1
map wm $cmd
map i $~/.config/machineconfig/settings/lf/windows/previewer.ps1 $f
map R $powershell $env:USERPROFILE/scripts/croshell.ps1 -r $f

# o file/folder Operations
map o
map od cut
map op paste
map oy copy
map oc $Set-Clipboard -Value $f
map c clear
map or rename
map <delete> delete
map <del> delete
map of reload
map os mark-save
map ol mark-load
map oR mark-remove
map oD !ouch d $f
map oC !ouch c $f '$f'.zip

# j jump
map j
map jc cd ~/code
map jd cd ~/data
map jD cd ~/Downloads
map jx cd ~/dotfiles
map jh cd ~
map ja cd $env:LOCALAPPDATA
map jA cd $env:APPDATA
map jj $pwsh -File $env:USERPROFILE/.local/bin/lvim.ps1 -- $HOME/.config/machineconfig/settings/lf/windows/lfrc



# m make
map m
map md $~/.config/machineconfig/settings/lf/windows/mkdir.ps1
map mf $~/.config/machineconfig/settings/lf/windows/mkfile.ps1

