iterm

iterm vim colorscheme not working

风流意气都作罢 提交于 2019-12-17 21:53:14
问题 When I run vim from the command line in iTerm, syntax highlighting doesn't seem to work locally. In vim for example I have installed a nice colorscheme that works quite well in MacVim but it would be great if in iTerm it showed the same one. Any ideas how I can turn this on? This is the color scheme I'm trying to use http://www.vim.org/scripts/script.php?script_id=2340 回答1: That color scheme looks like it only supports 256-color terminals. If Vim thinks that your terminal only supports 8

Incorrect colors with vim in iTerm2 using Solarized

坚强是说给别人听的谎言 提交于 2019-12-17 21:25:37
问题 I am having a strange issue with iTerm2, in terminal vim (non-gui) and the solarized color scheme. First, I have set iTerm2 to use the dark solarized colour scheme. I am also using solarized for vim. I have the following lines in my .vimrc set background=dark colorscheme solarized In the terminal the color scheme looks incorrect: For reference this is how it looks under MacVim (gui vim) What do I need to change in iTerm or my .vimrc to get the colors looking correctly in my console vim? 回答1:

将文本粘贴到vim时关闭自动缩进

Deadly 提交于 2019-12-12 13:03:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我正在努力学习Vim。 当我从剪贴板将代码粘贴到我的文档中时,我会在每个新行的开头添加额外的空格: line line line 我知道你可以关闭自动缩进,但我无法让它工作,因为我有一些其他设置冲突或某事(在我的.vimrc中看起来非常明显,但是当我把它们取出时似乎并不重要)。 当我粘贴代码时如何关闭自动缩进但在编写代码时仍然有自动缩进? 这是我的 .vimrc 文件: set expandtab set tabstop=2 set shiftwidth=2 set autoindent set smartindent set bg=dark set nowrap #1楼 这适用于我(+寄存器的情况,我使用的像aps之间的交换缓冲区): imap <silent> <S-Insert> <C-O>:set noai<CR><C-R>+<C-O>:set ai<CR> #2楼 把它粘在你的〜/ .vimrc中并开心: " enables :Paste to just do what you want command Paste execute 'set noai | insert | set ai' 编辑:反思, :r !cat 是一个更好的方法,因为它很短,语义,并且不需要自定义vimrc。 改用它! #3楼

How to exit alternate screen scrolling on iTerm2 Vim?

心已入冬 提交于 2019-12-11 15:19:13
问题 First, sorry if the title isn't precise. I'm in a weird situation, while using Vim on Mac iTerm2. More precisely, when I release two finger click it scrolls down 3 lines. Sort of same thing is mentioned at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683942 and its referred as "alternate screen scrolling". How do I came in this situation? Well, I was in a remote ssh session and just just closed macbook, put it on bag and went to lunch. When I came back I experienced this strange thing.

How do I set the iTerm2 session title through escape codes?

我的未来我决定 提交于 2019-12-11 05:57:59
问题 The iTerm2 page on badges mentions that session.name can be changed with escape codes, but describes the method somewhat cryptically: session.name The current session's name. Defaults to the profile name. May be changed with the escape sequence OSC 1 ; name ST , or by editing the session title in View>Edit Current Session . If you look further down the page at code describing how to change badges, we see a sort of Rosetta Store: The badge itself may be set with the following escape sequence:

Bash printing color codes literally and not in actual color

亡梦爱人 提交于 2019-12-10 12:53:13
问题 For some reason my shell script stopped printing my menu in color and is actually printing the literal color code instead. Did I somehow escape the color coding? Script #!/bin/bash function showEnvironments { echo -e "\e[38;5;81m" echo -e " SELECT ENVIRONMENT " echo -e "[1] - QA" echo -e "[2] - PROD" echo -e "\e[0m" } showEnvironments Output \e[38;5;81m SELECT ENVIRONMENT [1] - Staging [2] - QA \e[0m I am using iTerm on Mac OSX and the TERM environment variable is set to xterm-256color . 回答1:

node学习准备工作1 --- nvm下载、终端环境iterm2配置

让人想犯罪 __ 提交于 2019-12-09 21:48:13
学无止境 最近在重新学习js基础,可是感觉别人在讨论框架啊什么的,就觉得对于js基础学习提不起劲,想起来node不就是用基础js,也算是学以致用。 一 nvm下载 先下载nvm,下载过程中还遇到了问题,见博客 nvm安装 node学习其实不需要下面这些,只是我觉得学习本身就是一种好奇心的延伸,因此,出于兴趣,特地的配置了一下这些 二 iterm2终端下载及主题配置 觉得mac自带终端好丑,所以安装了iterm2, iterm下载地址 然后配置iterm2的主题 下载地址: http://ethanschoonover.com/solarized 下载的是压缩文件,你先解压一下,然后打开 iTerm2,按Command + ,键,打开 Preferences 配置界面,然后Profiles -> Colors -> Color Presets -> Import,选择刚才解压的solarized->iterm2-colors-solarized->Solarized Dark.itermcolors文件,导入成功,最后选择 Solarized Dark 主题,就可以了。 配置oh my zsh Oh My Zsh 是对主题的进一步扩展 3.1 一键安装 $ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my

How can I get mouse selection to work in emacs and iTerm2 on Mac?

*爱你&永不变心* 提交于 2019-12-08 22:39:33
问题 after turning on xterm-mouse-mode, any click on the in the screen returns "mouse-1 is undefined". What should I be defining "mouse-1" as? Is there some reason my mouse clicks are returning this event, and not others its suspecting? 回答1: I put this in my .emacs: (require 'mouse) (xterm-mouse-mode t) (defun track-mouse (e)) (setq mouse-sel-mode t) and that seems to do the trick, and now a mouse click in a split changes focus to the split. Note: I am using iterm2, and I found the info here: http

How do I insert a tab character in Iterm?

若如初见. 提交于 2019-12-08 14:52:30
问题 Simply put, I know you can do ctrl + v + tab to insert a physically real tab character in a bash statement. But how do I do the same for iTerm? 回答1: The answer was to hit control+v, then tab afterwards, not all together! Hope this helps someone. 回答2: It's not iTerm, but your shell that affects how you''re able to insert a tab. First, make sure you're in BASH shell: Type the following command: $ echo $RANDOM $BASH_VERSINFO 23714 3 The first is a random number, and the second should be the BASH

Why can't I get the cobalt2 zsh theme to work on my iTerm2?

谁说胖子不能爱 提交于 2019-12-08 04:50:39
问题 I want to install this ZSH theme . I downloaded both the iTerm2 and ZSH themes. The iTerm theme was imported through the preferences. The ZSH theme was inserted into ~/.oh-my-zsh/themes along with all the other ZSH themes. When I open my .zshrc and change ZSH_THEME="bobbyrussell" to ZSH_THEME="cobalt2" nothing happens. I restart iTerm but the colors are not changed. Updated with Details: ~ echo $ZSH_THEME cobalt2 ~ echo $PROMPT %/ ~ File: ~/.zshrc # Path to your oh-my-zsh installation. export