terminalcoder

u/terminalcoder


r/commandline•

Disclaimer: This has some Mac-specific + zsh-specific syntax, but could easily be tweaked to work in different environments.

I've wanted this functionality for a long-time and decided to hack it together. It's just another tool to help keep track of what has changed in a project.

→ Gist ←

https://preview.redd.it/0tji3d2es9j41.png?width=922&format=png&auto=webp&s=f1d0465cf1baccebb744ab6d4ef24eebb6a133d7

relative-date() {
  while read input_string; do
    local file_path=`echo $input_string | cut -d ' ' -f 5`
    local ls_date=`echo $input_string | cut -d ' ' -f 1,2,3,4`
    # A
289

r/neovim•

This is hand's down one of the most useful vim snippets I've come across and I decided to see if I could add another column next to the devicons that displays a git status indicator for any files that have been modified, or new.

It's a bit hacky, but seems to work 🤔

nnoremap <silent> <leader>e :call FzfFilePreview()<CR>

" Files + devicons + floating fzf
function! FzfFilePreview()
  let l:fzf_files_options = '--preview "bat --theme="OneHalfDark" --style=numbers,changes --color always {3..-1} | head -200" --expect=ctrl-v,ctrl-x'
  let s:files_status = {}

  function! s:cacheG
464




You've reached the end of this feed.