小编Ric*_*ich的帖子

在同一台机器上安装 Homebrew 和 Macports 是否安全?

我在 iMac 上安装了 MacPorts,并安装了相当数量的端口。

不过,我对试用 Homebrew 很感兴趣,因为我听说过很多关于它的好消息,并且因为我注意到它包含我使用的几个工具的更新版本。

但是两者可以在同一台机器上共存,还是我需要先完全卸载 MacPorts?

还有,如果两者可以同时安装,是不是就完全独立了?Homebrew 的特点之一是它不会重新安装系统中已经包含的东西的新版本(例如python)。这是否也扩展到不安装 MacPorts 已经维护的版本?

如果我随后卸载 MacPorts 会怎样?

package-management macports homebrew macos

81
推荐指数
5
解决办法
5万
查看次数

如何在我的 .vimrc 中区分当前的操作系统?

我在 OS X 和 Windows 上都使用 Vim,配置几乎相同。

我希望能够.vimrc在两个操作系统上使用相同的操作系统,但是我需要以不同的方式配置一些东西。

我想添加到我的.vimrc文件中的是:

:if <windows>
  "some windows-specific settings here
:elseif <os x>
  "some os x-specific settings here
:endif
Run Code Online (Sandbox Code Playgroud)

但我不知道<windows>and 有什么用<os x>

这可能吗?

windows vim macos

20
推荐指数
1
解决办法
6991
查看次数

如何让 ssh-agent 通过 ssh 和 tmux(在 OS X 上)工作?

我为我的 github 帐户设置了一个私钥,我相信它的密码存储在 OS X 的钥匙串中。当我打开终端窗口并输入ssh git@github.com.

但是,当我在 ssh 会话上或本地在 tmux 会话中运行 bash 时,每次尝试 ssh 到 github 时,我都必须输入密码。

这个问题表明 screen 存在类似的问题,但我不太了解这个问题,无法在 tmux 中修复它。还有这个页面,其中包含一个相当复杂的解决方案,但用于 zsh。

编辑

为了回应@Mikel 的回答,我从本地终端得到以下输出:

[~]
$ echo $SSH_AUTH_SOCK
/tmp/launch-S4HBD6/Listeners
[~] 
$ ssh-add -l
2048 [my key fingerprint] /Users/richie/.ssh/id_rsa (RSA)
[~]
$ typeset -p SSH_AUTH_SOCK
declare -x SSH_AUTH_SOCK="/tmp/launch-S4HBD6/Listeners"
Run Code Online (Sandbox Code Playgroud)

而通过 ssh 或 tmux 我得到:

[~]
$ echo $SSH_AUTH_SOCK

[~]
$ ssh-add -l
Could not open a connection to your authentication agent. …
Run Code Online (Sandbox Code Playgroud)

ssh ssh-agent tmux macos

18
推荐指数
3
解决办法
1万
查看次数

如何让 Vim 缩进列表项中的所有行 - 而不仅仅是第二行?

nVim的的选项formatoptions设置将缩进列表项的第二行以匹配第一行的缩进。但是,第三行和后续行恢复为无缩进,因此:

1. Doing a list. This is my list. I am writing
   a list. It's quite a long list. It's really
long. I can't believe how long it is. And
this just the first item!

2. Another list item.
Run Code Online (Sandbox Code Playgroud)

我真的很喜欢它缩进所有的行,像这样:

1. Doing a list. This is my list. I am writing
   a list. It's quite a long list. It's really
   long. I can't believe how long it is. And
   this just the …
Run Code Online (Sandbox Code Playgroud)

vim formatting

17
推荐指数
2
解决办法
2805
查看次数

为什么 Windows 8 应用程序搜索不再匹配子字符串?

当我第一次安装 Windows 8 时,我可以通过按一次 Windows 键调出开始屏幕来启动应用程序,然后键入应用程序名称的子字符串。

从那以后的某个时候,“子字符串”部分似乎已经停止工作。

所以现在,例如,如果我输入chrom,我会得到,No apps match your search,但是当我输入 final 时e,会弹出Google Chrome。同样,ie用于调出 Internet Explorer。现在我必须Internet在找到任何东西之前输入整个单词。

微软是否真的改变了功能以使其变得不那么有用,还是只是在某个地方有一些设置以某种方式被摆弄来创建这种行为?

search windows-search application-launch windows-8

13
推荐指数
1
解决办法
1099
查看次数