soniclooki.blogg.se

Using pmenu
Using pmenu












using pmenu

Ctrl-J, Ctrl-M, Enter: quit and output the selected item.Ctrl-I, Tab: complete the selected item.Ctrl-H, Backspace: delete the character before the cursor.Ctrl-C, Ctrl-G, Ctrl-[, Escape: quit without selecting an item.v, -version show program's version number and exit n NAME, -name NAME the cache file name with the most recently used items Pick and show a definition from the WordNet dictionary on the dict server ( by default) using either the curl or dict command: pmenu -c "m= will be replaced by the

using pmenu

selected_paths ) endif redraw ! endfunction

using pmenu

Pick a title from the markdown file and jump to it: function ! PmenuMarkdownTitle () let titles = filter (getline ( 1, '$' ), "v:val =~ '^#\\+\\s'" ) let selected_paths = systemlist ( 'pmenu', titles ) if !empty (selected_paths ) call search ( '^#\+\s'. fnameescape (selected_items ) endif redraw ! endfunction shellescape (cache_name ), items ) if !empty (selected_items )Įxecute "edit ". shellescape (current_item )) endif let selected_items = systemlist ( "pmenu -n ". '" if isdirectory ( "./.git" ) let item_command = "git ls-files" endif let cache_name = fnamemodify (getcwd (), ":t" ) let items = sort (systemlist (item_command )) let current_item = expand ( "%." ) if !empty (current_item ) let items = filter (copy (items ), "v:val != ". Pick some file from the current directory for editing in VIM using Ctrl-P shortcut (a la the CtrlP plugin): function ! Pmenu () let item_command = "find -maxdepth 3 -type f -regextype posix-egrep ! -regex '.*/(_pycache_|\.git|\.svn|node_modules)/.*' -printf '%P Pick some file from the current directory: command ls /usr/bin/ | pmenuįind -maxdepth 3 -type f ! -path "./.git/*" ! -path "./.svn/*" -printf '%P\n' | LC_COLLATE =C sort | pmenu A dynamic terminal-based menu inspired by dmenu written in Python without dependencies with an optional MRU ordering which could also be used as an application launcher and CtrlP alternative.ĭisplay some menu items: echo -e "foo \n bar \n baz" | pmenu














Using pmenu