lfrc.ps1 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # interpreter for shell commands
  2. set shell powershell
  3. # Shell commands with multiline definitions and/or positional arguments and/or
  4. # quotes do not work in Windows. For anything but the simplest shell commands,
  5. # it is recommended to create separate script files and simply call them here
  6. # in commands or mappings.
  7. #
  8. # Also, the default keybindings are defined using cmd syntax (i.e. '%EDITOR%')
  9. # which does not work with powershell. Therefore, you need to override these
  10. # keybindings with explicit choices accordingly.
  11. # change the default open command to work in powerShell
  12. cmd open &start $Env:f
  13. # change the editor used in default editor keybinding
  14. # There is no builtin terminal editor installed in Windows. The default editor
  15. # mapping uses 'notepad' which launches in a separate GUI window. You may
  16. # instead install a terminal editor of your choice and replace the default
  17. # editor keybinding accordingly.
  18. map e $vim $Env:f
  19. # change the pager used in default pager keybinding
  20. # The standard pager used in Windows is 'more' which is not a very capable
  21. # pager. You may instead install a pager of your choice and replace the default
  22. # pager keybinding accordingly.
  23. map i $less $Env:f
  24. # change the shell used in default shell keybinding
  25. map w $powershell
  26. # change 'doc' command to use a different pager
  27. cmd doc $lf -doc | less
  28. # leave some space at the top and the bottom of the screen
  29. set scrolloff 10
  30. # use enter for shell commands
  31. map <enter> shell