2.html (1782B)
1 <html> 2 <head> 3 <title> 4 bpaul blog 5 </title> 6 </head> 7 <body> 8 <a href="/linux-blog/">back</a> 9 10 <h1>fzf is better</h1> 11 <p> 12 date: 20/05/21<br> 13 fzf is better than dmenu! 14 The problem with dmenu is that you cant do things with it in the terminal (well you can but it might be weird) like cding. 15 But with fzf, you can! 16 My favourite thing about fzf so far is probably the fzf-tmux script that fzf comes with. 17 But yeah fzf is basically just dmenu but better (oh yeah it is also faster i think).<br><br> 18 19 Another thing about fzf is the vim integration. 20 It is very useful!<br><br> 21 22 Here is a list of some cool fzf scripts:<br> 23 <a href="https://github.com/junegunn/fzf/wiki/Examples#changing-directory)">fd</a><br><br> 24 fh (Search command history and run command)<br> 25 This is basically just CTRL-r<br><br> 26 <pre><code> 27 fh() { 28 eval $(history -n | fzf-tmux -r +m) 29 } 30 </code></pre><br> 31 32 Here is a list of some cool fzf vim thingos:<br> 33 Colorscheme menu (lua lol):<br> 34 <pre><code> 35 function colourscheme() 36 vim.api.nvim_eval('fzf#run(fzf#wrap({"source":luaeval("{'..string.gsub(vim.api.nvim_eval("globpath(&rtp, 'colors/*.vim')") .. '\n','.-/colors/(.-).vim\n',"'%1',")..'}"),"sink":"colorscheme"}))') 37 end 38 </code></pre><br> 39 Basically it gets the colors with globpath and then does regex stuff then feeds it into fzf with the colorscheme sink (sinks are the commands that get run with the thing selected).<br><br> 40 41 <br> 42 43 I might add more stuff here later 44 </p> 45 </body> 46 </html>