Brand new to OSX/MacOS and looking for tips!

EDIT: I already have a touchbar and can answer questions about that, if y’all would like. Seems many of folks are anticipating some hardship, but so far I haven’t noticed a ton of drawbacks if you’re clever. (Maybe I’m just coming from PC and Linux, where things are very rarely set up beautifully without a bit of tweaking.)

Bit of background on me: grew up scavenging discarded hardware and playing games a few generations behind. Eventually got current with a desktop Windows PC. However, the huge number of cheap computing options led me to linux and now, MacOS.

I’m writing some interactive audio stuff, possibly with Unity or BGE at some point. But I really need tips on programming workflow.

So far I’ve got:
- my basic grasp of vim
- iTerm as a “visor” terminal for tweaking things while I’m working in another IDE (usually SuperCollider) or Ableton etc.
- a well organized filesystem (mostly because going Mac coincided with organizing my life)
What I don’t got:
- any clue where to start looking for practical ways to start editing my .vimrc or scripting/config in general
- much knowledge of bash scripting (especially for batch processing/moving of large numbers of files)
- a grasp on good organizational practices for development (honestly, in general)

I’ve done quite a bit of browsing on StackExchange and some other places, but really feel like this community will have some more focused advice.

I tried to lay out a few specific issues I’ve got, but if you just want to link to any useful threads or resources I’m down to do some homework!

2 Likes

In a hurry, but no doubt more later - however: if you’re a terminal user, you should really install Homebrew asap - it’s essentially the de facto OSX package manager, and it will make your life infinitely easier.

Regarding vim - there are lots of good dotfiles on github, though I found it more elucidating to build my own. Thoughbot have various good articles/tutorials/courses on vim. My number one tip was: disabling the cursor keys in my vimrc and wrapping my head around using vim ‘properly’ - basically, if you’re repeating keypresses, it’s possible you could do something faster. Beyond that, Tim Pope’s pathogen is essential as a way to make vim plugins sane, and a few plugins that make my life easier include surround, nerdcommenter, and command-t. I also have more natural splitting set up.

Must go to work now - will probably check back in later.

4 Likes

+100 for homebrew

And also installing the Inconsolata font.

I have some dot files online that are forked from Zach Holman’s, though I think the latest version of mine isn’t pushed yet.

If you aren’t whole-hog on vim yet (though it sounds like you might be) and plan to stick with Mac for a while, I would reconsider vim in favor of something like Sublime text, primarily because it seems like the escape key is a doomed piece of kit for Mac over the next 5-10 years (thanks, TouchBar).

I’ve been using vim as my main squeeze for probably 8 or 9 years by now, and have been procrastinating switching to Sublime for 2 or 3

1 Like

Other key vim tips:

  • swap control and caps-lock. The moment Control is next to A, you understand why vim shortcuts are what they are
  • rebind something else to the escape sequence. I use jj though jk would make typing js way easier. Anyhow, I never, ever used the escape key because it’s way too far from my home row.

I actually use MacVim just so I can occasionally use a mouse and Clipboard.

2 Likes

One hugely useful command-line thing not a lot of people know: there are two executables called pbcopy and pbpaste. pbcopy puts input to it onto the clipboard; pbpaste puts the clipboard onto STDIN.

So you can do something like ls -lh *.txt | pbcopy and you can then paste a directory listing of textfiles into another application. I do this a lot.

Oh, and open effectively does the equivalent of double-clicking on $1. So open . would open the current directory in finder, and open file.txt would open file.txt in your default editor.

Oh, and: iTerm2 is much better than Terminal, imho. I would recommend installing it.

7 Likes

YES

I’ll have to try this. I suspect I’m getting RSI from the escape key anyways.

inoremap jj <ESC>

also:

:nnoremap <CR> :nohlsearch<cr>

will clear any search buffer just by hitting return, which I find handy. I have quite a few things set up where just hammering a key will get me back to basic control mode.

God, this thread is turning into Vim Tips quite fast.

1 Like

yeah, i have this one already :slight_smile:

back to the general topic, i’d also recommend getting Alfred (though I guess maybe Spotlight has caught up with it? Alfred still seems faster).

I’m on the fence about Flux. Theoretically I like it, but it kicks in too soon, and I wind up disabling it a lot when I’m doing any kind of design work after 4 or 5 pm

Can’t weigh in on Vim but on general OSX stuff:

  • turn on tap to click and three finger drag (which has now moved to the accessibility menu in Sierra)
  • +1 for Alfred (and remap the Spotlight shortcut to Alfred)
  • +1 for f.lux
  • Moom for easy keyboard window moving
  • Bartender for a more minimalist menu bar
  • Evernote, Dropbox, Omnifocus, 1Password, Private Internet Access are all default installs for me
  • turn on automatic hiding of the Dock
  • Install Airmail instead of Mail
  • Soundflower for audio routing
3 Likes

A lot of stuff is mentioned already, but here’s some more less known stuff:

  • Replace capslock with escape for vi use with Seil to be (future) touchbar proof lol. Not needed on Sierra as there’s a osx preference somewhere.
  • I’m trialling the KWM tiling window manager at the moment, works ok so far.
  • Automate your mac with Hammerspoon.
  • I just use vim-sensible and some programming lang specific plugins. Learn raw vim instead of janus, etc.
  • Homebrew is mentioned, also use homebrew cask to install your desktop apps as it makes migrating to your next mac easier with: brew cask list
  • Oh, and my fav mac app is nvAlt

some privacy related things:

  • Little Snitch is a great outbound firewall, to see whats phoning home, which is quite shocking sometimes.
  • Using “Ungoogled chromium” at the moment which is great as it gives you the safety of chrome, minus the selling your soul to google part. There’s also a extension called “Vimium” which gives you vim shortcuts in the webbrowser!
3 Likes

lots of good tips and tastes… my taste: :slight_smile:

unity: monodevelop has been a pita for me, vs code can be set up to use with unity (including debugging!)

I’m totally fine with current spotlight (used launchbar before, but ditched it when they updated spotlight. not to say these third party solutions cant’t offer you a lot more if you wish).
Warning: spotlight made me veeeery lazy with organizing files, as every search just loads instantly. Cmd+space your best friend. launcher, calculator, etc…

I can’t stand newer finder, but use path finder instead (mostly because of finders side bar and search results, also: tabs and split window (!) ). not cheap though, last time I checked. (only drawback is no airdrop, and finder has to be running in background for timemachine to work, no big deal other than the finder icon in the bar with a white dot).

homebrew, yes.

+1 for three finger drag (!)

alt click notification center in menu (symbol most right) mutes notifications (not that I ever use that view itself)

alt click audio symbol is also handy (specially if you have an airplay device)

better touch tool has become a must for me for custom shortcuts and gestures to all kinds (!) of commands, non fullscreen split screen (expand to left/right) being the most used one… but it’s not free anymore…

Dash has been super useful for instant browsing of framework docs

Definitely do this! For your ~/.vimrc or ~/.vim/vimrc:

" disable arrow keys in normal-ish modes
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>

" disable arrow keys in insert mode
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>

Also, a big recommendation for Practical VIM.

One other tip, learn some Emacs keybindings too as they are supported everywhere in OSX:

  • C-h for delete
  • C-a for beginning of line
  • C-e for delete to end
  • C-b backwards char
  • C-f forwards char
  • C-p select previous (e.g. in URL autocomplete)
  • C-n select next

C-h is particularly handy as a way to keep your fingers on the home row.

2 Likes

C-w for “delete word” is super handy, especially for long shell incantations.

1 Like

Great thread. Long time mac user but a few bits I hadn’t heard of. :beers:

Hadn’t seen this one. Curious what scripts you use most?

Same here. I used quicksilver forever but have found spotlight just good enough not to both reinstalling. (And QS was crashing just often enough…)

Oh man, I bet they’ll see a lot more subscriptions in the next few years…

One that is essential to me is jumpcut. I can’t imagine life without a clipboard buffer.

For git, I’m mainly on the command-line or on github via the web but I do lean on tower a bit as well. If you get tower, be sure to install the CLI tools. (In fact, as a general tip look for CLI tools for every non-terminal app you use since as a vim user I expect you spend a lot of time there.)

+1000 to f.lux. @rknLA: I think there’s a “working late” setting that you might look at?

Emphatic :thumbsup: to iTerm2. Also, on the IDE front, I’m really impressed with vs code. Great workflow from the command-line too.

Open question: anyone using a music player besides iTunes? Preferrrably one that plays nice with the iTunes library?

Funny you should bring this up (the touch bar, I mean): I love it! ctrl+leftbracket works just fine for escape in vim (as does the touchbar escape key, although not as well). I really would love taptic feedback on the touchbar, though.

I tried Sublime Text (when I tried out DUST, the C64 compiler) and still prefer vim as it’s also installed on all my raspberry pis and VMs.

Definitely checking out Iconsolata, though.

Ah, turns out it is iTerm2 that I already have…

I suppose I should start switching to that asap…

Ah built into Alfred, which really helps.

And also interested about the iTunes alternatives.

(sorry for the reply spam, all. going to make one big reply for everything else at the moment.)

Have you checked out Spectacle? You’ll have to build from source but it’s very quick. Keyboard shortcuts for halfscreen, quadrants are very easy. It doesn’t offer too much in the way of functionality beyond snapping windows around, but the rest can be handled in other ways while Spectacle just works in the background.

This looks very promising!!!

Thank you!! Homebrew was quite literally my first move because of my undying love for package managers. But this tip just really changed things! Thanks!

I’m going to make note of this, but I’m a current Nexus 6P user and actually currently use Google services just about every day. I’m on Safari on the Mac, though. I don’t know why but it’s appealingly minimal and helps me focus when I’m on the MacBook. There are tasks that I need my scripts and extensions for, but for that I can just open Chrome since Google already owns all my data. One day, though…

+10000 shift clicking a list of mp3s and hitting (open in VLC) is getting old fast.

1 Like

KWM, where have you been all my life?

1 Like

Some counter positions form a looooooong time Mac developer (as in, I was on the Mac team at Apple in 1985!!!)

  • I’m a life-long vi/vim user: Get SublimeText or Atom and use that instead.
  • I’m a life-long vi/vim user: set -o vi will let you use vi keybindings on the command line! (This is a bash-ism and works wherever bash is sold)
  • Use git to manage your projects, and Atlassian’s free SourceTree as a lovely GUI into it.
  • The font Andale Mono is already on your mac - it is excellent for terminals. Also, I know people swear by iTerm2, but I find the standard Terminal completely up to the task.
  • Don’t use homebrew: Having developed tons of open source, I’ve learned the hard way that having homebrew on your system often conflicts with the library assumptions of OS X. As a consequence, stuff you build will work fine for you, but often not work for users who don’t have homebrew. The annoying flip-side is that if you want to use some open source library, you often have to build it yourself… ah well.
2 Likes