![]() ![]() Though this is something I should not use at all anyway. I recently mapped to use vim-sneak in my vimrc, which is pretty aggressive/awesome, but it is super natural to make set to Sneak S. ITerm cannot detect key inputs shift + space or shift + enter, as far as I can tell. Lingering Disadvantages to iTerm Beta/Nightly + Neovim as compared to MacVim I’m betting there’s some conditional I can add to that if statement to accomplish this, but I don’t know it at this point. Ideally my vimrc would be smart enough to use Terminal’s given colors when running Neovim. The if statement in my vimrc is not smart enough to NOT run that set termguicolors line when I’m running ol’ fashioned default OS X Terminal, so now when I run Neovim there all the colors are totally fucked. I haven’t played around with this too much yet, but it seems to work with the setup described in this post! Lingering Issue(s) Let g:terminal_color_background="#202020" " These are supposedly colors for Neovim's terminal emulator Then in your ~/.vimrc (or your nvim config file, without the if statement I suppose): ![]() (Optional:) Set Cursor to “Box” and turn on blinking (helpful in Vim).Uncheck “Draw Anti-alias text with thin strokes”. ![]() Then in iTerm 2 > Preferences > Profiles > Text ITerm2 > Preferences > Profiles > Terminal > set Report Terminal Type “xterm-256color” Once that’s installed, it’s mostly a matter of tweaking some settings. This had been my problem for the last few weeks– I was using the standard-issue release of iTerm2, which doesn’t support what I had been trying to do at this point at least. How I Did Itįirst, assuming you’re running OS X 10.8 or higher and want to use iTerm2, you currently need to download and install either the recommended test release, iTerm2 0206 beta ( dmg direct download), iTerm2 0113 beta (OS 10.8+) ( dmg direct download), or a Nightly build of iTerm2. Maybe I’ll compare the current pros and cons below. Part of this desire was to try to get my day-to-day Vim usage back into a terminal, since that feels more authentic and may be the only way to use Vim when working on a remote box. But given the advantages of Neovim (some which I read about in this blog post), and its advertisement of true (read: hex) colors, I wanted to figure out how to get my precious hex colors in Neovim and/or the terminal somehow. The first way I made a setup that used the hex color codes in a Vim colorscheme was by using MacVim. It’s my view that a setup that uses the hex color codes is infinitely preferable for 2 reasons: (1) You get a far larger variety of colors to use in your theme, and (2) the theme always appears the same, no matter the user’s terminal color preferences. My understanding, still, is that you specify the hex color codes for when they can be used (GUI), then as a fall back, you tell the colorscheme to rely on the user’s terminal to color different parts of code syntax. In that Vim colorscheme file, following the pattern of another such file, I entered both a set of hex color codes and assigned variables like s:cterm08. ![]() I made a decent colorscheme for Vim called Mustard (it’s based on my favorite theme for Sublime Text, which is also called Mustard). But! Today I seem to have figured it out, and I figured I’d put it up here on the blog for next time I need to do it, or in case anyone else had the same problem as me. However this configuration didn’t “just work,” as I hoped it would at least, and it frustrated me to no end. I also understood that I’d need to put some settings in my nvim config file (wherever that is these days), or a “nvim section” of my symlinked. I understood that I would probably need to use a terminal emulator rather than OS X’s default Terminal app, and I knew one such emulator was called iTerm2. Note: I’ve written an updated version of this post that shows how to get true colors with terminal Vim or Neovim and iTerm2įor a few weeks now, I’ve been picking at the problem of getting “true” colors in Neovim, as the creators tout on the official website. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |