Hacker Newsnew | past | comments | ask | show | jobs | submit | sisk's commentslogin

Thanks for this info. First I'd heard of it. Here's a link for others. https://developer.1password.com/docs/ssh/bookmarks/


> No ⌘. sending CTRL-C

This comment sounded familiar[0]. :) For what it's worth, still possible with:

  keybind = "cmd+.=text:\x03"
[0]: https://news.ycombinator.com/item?id=42889411


Haha, thanks again :)

I've been delaying a major migration to NeoVim on [modern-terminal-I-can-never-decide-which] for years. Wezterm, Ghostty, iTerm2. None is exactly perfect, so I just keep watching them develop.


I recently migrated from vim to neovim and you can just migrate everything. I forgot where I found this but put this in ~/.config/nvim/init.vim

  " Load vim configs
set runtimepath^=~/.vim runtimepath+=~/.vim/after let &packpath = &runtimepath source ~/.vimrc

Then in my zshrc (well... I organize differently) I have the function

  function _exists() {
    command -v "$1" &> /dev/null
  }

  alias_vim() {
    if (_exists nvim)
    then
        alias vi='nvim'
        alias vim='nvim'
    elif (_exists vim)
    then
        alias vi='vim'
    fi
  }


FWIW, zsh has a commands hash to make stuff like this potentially easier and cleaner. The following isn't quite how I'd do it, but is functionally equivalent.

    (( $+commands[vim] )) && alias vi=vim
    (( $+commands[nvim] )) && alias vi{,m}=nvim


I wasn't aware of +commands, thanks. Though I'm not sure this is easier and you can translate mine to bash trivially

Yours isn't technically equivalent though it is functionally. If we have both vim and nvim then we'll alias vi twice.

Also, your program provides less clarity. It saves lines but at a large cost to readability. I tend to share my dotfiles with newbies a lot so readability is very meaningful.

I wrap mine up in functions too because at the end of my alias file I can add something like this

  # aliases.zsh
  main() {
    alias_ls || echo "ls aliasing failed"
    alias_vim || echo "vim aliasing vailed"
  }

  main
It's a bit overkill and I never expect a simple alias like that to fail but there are three distinct advantages I get for being just a tad more verbose:

1) I have more complicated versions to deal with things like fd and batcat which have different names different operating systems (`fd` vs `fd-find` / `bat` vs `batcat`) and some additional configurations.

2) I can disable the alias by commenting out one line

3) knowing exactly where the alias is being loaded and thus what aliases are loaded.

Bonus) fails loudly but continues (it's an alias, I don't want you fail fail)

A few extra keystrokes are worth this advantage imo. Especially since I'm using vim so it's actually not any additional typing lol

It's style, so the choice is up to you and they'll accomplish the same things, but I'm just explaining why I use this design pattern. I've only given a stripped down snippet of code so I hope this context helps explain the larger pictures and how it can be used for larger needs.


(Surely this issue must've been discussed/debated elsewhere ad nauseum because it seems an odd design decision to leave out such a common macos binding...)

But having only used ghostty as-is and getting bamboozled by the copy paste situation, this is game changing. I was just going to wait till preferences had a GUI/TUI.. So thanks!


There's a setting that will allow you to double-click to open a file from the multibuffer which I find more natural:

  { "double_click_in_multibuffer": "open" }


Re GPU usage: noticed this myself a few months back and decided to poke around. Recommend turning off the minimap if you have it enabled. There seems to be some over-rendering that is exacerbated by it. It's actively being investigated and improved upon (0.192 was a great step in the right direction) but, even still, I've found it (currently) has a big positive impact once disabled.


It hasn't been a huge deal: I'm still getting a decent number of hours doing work on battery on my Framework 16, and usually I can plug into AC for a little bit if it gets too low. That said thanks for the information; I'll have to keep it in mind.


Hiya. No questions but just an fyi: the version of `@fresh/init` mentioned in the article (`2.0.0-alpha.30`) fails to run. Looks like latest at this time (`2.0.0-alpha.33`) runs successfully.


Thank you! We fixed it.


If I understand this correctly, the `BroadcastChannel` API solves a similar purpose.

https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_C...


Oh, did not know about it :D Thank you! Added a link to this to the TabSub landingpage


My pleasure—happy to share an alternative. Thanks for making and sharing a thing!


I came to say this as well. Surely it is the proper way to do this. Could be combined with weblocks if you want some master/leader event bus tab or web worker


Heads-up: the terms and privacy policy links are broken.


zsh also supports the "alias anywhere" concept (their term is "global alias") by using the `-g` flag.

   alias -g ag='2>&1 | grep'
   some-command ag 'words' # equivalent to: some-command 2>&1 | grep 'words'


Yeah, it's very convenient. Here are a few of mine(tested on OS X):

  alias -g L="| less"
  alias -g T="| tee"
  alias -g C="| pbcopy"
  alias -g @all="> /dev/null 2>&1"
  if command -v rg > /dev/null; then
   alias -g G="| rg"
  else
   alias -g G="| grep"
  fi


This is possible with this newly released version. Just add this to your config.

  keybind = "cmd+.=text:\x03"


Thanks!


Websockets are bidirectional while SSE is unidirectional (server to client). That said, there's nothing stopping you from facilitating client to server communication separately from SSE, you just don't have to build that channel with websockets.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: