Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I understand why someone would want to start with a prefilled vimrc, but I really can't stress enough how useful writing your own vimrc is. I started with bits and pieces from everywhere on the internet, but one day, I sat down and wrote my own vimrc. I realized I didn't even know 1/2^32th of the things that were possible with vim!


I used to customize vim quite a bit, but I got tired of trying to sync my config across multiple systems, some behind corporate firewalls.

I run into this with TMUX too. It's a pain when you are used to your specific config to the point that it's hard to use the default config.

I got into emacs when I started lisping, but vastly prefer vim's keyboarding and macros. So when spacemacs came about, I jumped on board and love it. The power of emacs and the sense of vim.

Plus, I don't have to customize spacemacs aside from enabling modules I want... very easy to do. Very easy to keep in sync across multiple machines.


If `git pull` works, I recommend just putting all your dotfiles in a git repository. If `git pull` doesn't work, then you've got Problems.


Or you know, you're ssh'd into a machine, that other developers use, too; has specific networking requirements, etc..


For shared accounts, it's really annoying if others mess with settings. For that reason, I use the following piece of shell code that I put in .bashrc. Explanation: you configure the MYMACHINE variable as the IP address you usually come from.

  # If we're logging in through SSH, write this down
  if [ -n "$SSH_CLIENT" ]; then
    # Alternative settings
    MYMACHINE="172.16.140.14"
    FROM=`echo $SSH_CLIENT | cut -f1 -d" "`
    case $FROM in
      *$MYMACHINE)
        export TMOUT=180 #Logout after 3 minutes
        set -o vi
        # all sorts of other settings
      ;;
    esac
  fi


Yep. I spend all day connected to machines that I have to access through a jump server because they have no direct internet access in or out themselves. No way is it worth it for me to customize anything there.

I realize that this is a pretty rare situation though.


I find TRAMP (https://www.emacswiki.org/emacs/TrampMode) invaluable in these situations. It lets you run shells/edit files on remote machines from within your local Emacs. There are a few quirks that you need to get used to, but it makes Emacs + a bunch of regular Linux boxes into something that feels very Plan-9-y.

In your case, you would want to look into the multihop settings that will let you open files and eshells on remote machines, but use an intermediate machine (your jump boxes) to get there.


>I used to customize vim quite a bit, but I got tired of trying to sync my config across multiple systems, some behind corporate firewalls.

Mine is on github. https://github.com/milesrout/.vim

I can operate without it, though. The only thing is that I always have swap : and ;.


That's very true. On other hand based on my experience from San Francisco Vim meetup many beginners give up because of a steep vim learning curve at the beginning.

It's better to start from something that already solves code editing problems and then customize it or even rewrite rc from scratch.




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

Search: