小编hug*_*eow的帖子

如何理解这个vim脚本?

以下是vim插件的vim脚本:

vim的语法有点奇怪:

  1. !exists("*s:SetVals"),为什么他们之前是明星s:
  2. 功能!,为什么有一个!角色?
  3. &iskeyword,这是一个变量,如果是,它定义在哪里?
  4. 什么是s:g:,它们之间有什么区别呢?
  5. 为什么要使用?比如let &dictionary = g:pydiction_location,我可以改变它&dictionary = g:pydiction_location吗?

if!exists("*s:SetVals")

  function! s:SetVals()
      " Save and change any config values we need.

      " Temporarily change isk to treat periods and opening 
      " parenthesis as part of a keyword -- so we can complete
      " python modules and functions:
      let s:pydiction_save_isk = &iskeyword
      setlocal iskeyword +=.,(

      " Save any current dictionaries the user has set: …
Run Code Online (Sandbox Code Playgroud)

vim editor

8
推荐指数
3
解决办法
2613
查看次数

如何调试作为vim插件一部分的python函数?

python调用在我的一些.vim文件中定义.

:breakadd file linenumber xx.vim 似乎不起作用.

当我按下一个触发某些python函数调用的键时,它不会停在该行.发生了什么?顺便说一句,因为我使用打开文件,所以我处于vim的调试模式vim -D filename.

如下图所示,我想要做的是调试一个python函数,当我按下F5vim 时调用它.

在此输入图像描述

python debugging vim vim-plugin

6
推荐指数
1
解决办法
611
查看次数

如何在/ proc中显示文件的大小?它不应该是零大小

从下面的消息中,我们知道文件/ proc/sys/net/ipv4/ip_forward中有两个字符,但为什么ls只是显示这个文件的大小为零?

我知道这不是磁盘上的文件,而是内存中的文件,所以有没有命令可以看到/ proc中文件的实际大小?

root@OpenWrt:/proc/sys/net/ipv4# cat ip_forward | wc -c
2
root@OpenWrt:/proc/sys/net/ipv4# ls -l ip_forward
-rw-r--r--    1 root     root            0 Sep  3 00:20 ip_forward
root@OpenWrt:/proc/sys/net/ipv4# pwd
/proc/sys/net/ipv4 
Run Code Online (Sandbox Code Playgroud)

linux ls file filesize proc

6
推荐指数
2
解决办法
4296
查看次数

知道嵌入式系统是使用glibc还是仿生?

例如android正在使用仿生而不是glibc,但如何弄清楚它真的是使用仿生http://en.wikipedia.org/wiki/Bionic_(software),而不是glibc?

我可以在/ proc文件系统中找到这些信息,或者是否有任何命令可以告诉bionic在当前系统中使用?

顺便说一句,嵌入式系统可能有多个c lib吗?

android glibc embedded-linux bionic

5
推荐指数
1
解决办法
2048
查看次数

什么是 git-remote-http 进程,为什么有这么多 git 进程?

我在shell中找不到git-remote-http命令,为什么会有这样的过程?

我只打开了一个git svn进程,为什么有这么多git相关进程?

[mirror@home git]$ pgrep git
12035
12036
22308
22309
22394
22397
24128
24129
26136
26137
[mirror@home git]$ pgrep git -lf
12035 git fetch origin
12036 git-remote-http origin http://git.savannah.gnu.org/r/weechat.git/
22308 git svn clone http://code.taobao.org/svn/obconnector/
22309 /usr/bin/perl /home/mirror/ins_git/libexec/git-core/git-svn clone http://xxx.org/svn/xxx/
22394 git update-index -z --index-info
22397 git hash-object -w --stdin-paths --no-filters
24128 git fetch origin
24129 git-remote-http origin http://git.xxx.org/xxx.git/
26136 git fetch origin
26137 git-remote-http origin http://git.xxx.org/xxx.git/ 
Run Code Online (Sandbox Code Playgroud)

git process

5
推荐指数
1
解决办法
6471
查看次数

为什么我在构建python时无法构建sqlite3?

为什么我只是无法构建sqlite?

它与readline或_tkinter或其他东西有关吗?

pes/libffi/src/prep_cif.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/closures.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/dlmalloc.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/ffi.o build/temp.linux-i686-2.7/home/mirror/build/tmp/Python-2.7.3/Modules/_ctypes/libffi/src/x86/sysv.o -L/usr/local/lib -o build/lib.linux-i686-2.7/_ctypes.so

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
bz2                dbm                gdbm            
readline           sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Run Code Online (Sandbox Code Playgroud)

无法构建这些模块:

_sqlite3

running build_scripts
creating build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /home/mirror/build/tmp/Python-2.7.3/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc …
Run Code Online (Sandbox Code Playgroud)

python sqlite python-2.7 python-extensions

5
推荐指数
1
解决办法
5483
查看次数

为什么git首先压缩对象,然后接收它们?我认为应该是相反的

remote: Counting objects: 666377, done.
remote: Compressing objects: 100% (150501/150501), done.
Receiving objects: 0% (2171/666377), 756.00 KiB | 119 KiB/s     
Run Code Online (Sandbox Code Playgroud)

我的怀疑是,在将物品转移到我的电脑之前如何压缩物体?这是unbelievalbe,因为我们必须首先获取文件,然后压缩它..

这是一个错误的命令git输出信息的错误?

git version-control

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

XI.:找不到命令,并且无法构建某种软件,怎么了?

错误信息如下:

./libtool: line 1129: X-I.: command not found
./libtool: line 1129: X-DLT_CONFIG_H=<config.h>: command not found
./libtool: line 1129: X-DLTDL: command not found
./libtool: line 1129: X-I.: command not found
./libtool: line 1129: X-I.: command not found
./libtool: line 1129: X-Ilibltdl: command not found
./libtool: line 1129: X-I./libltdl: No such file or directory
./libtool: line 1129: X-I./libltdl: No such file or directory
./libtool: line 1129: X-g: command not found
./libtool: line 1129: X-O2: command not found
./libtool: line 1129: X-MT: command …
Run Code Online (Sandbox Code Playgroud)

automake autoconf build autotools libtool

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

与git相比,颠覆的优势是什么?

众所周知,git在这些日子里非常受欢迎,因为它具有高效率,因为它具有本地计算机上的所有历史记录,并且可以在没有网络的情况下完成历史检索.也许对于外联网用户来说,网络问题并不重要,但是git也有其他类型的优势,比如轻量级分支(我仍然不确定它和svn的分支之间有什么区别,为什么git的分支很轻)?

我也知道很多人还在使用颠覆,为什么?如果git很好,他们可能会切换到git :)

所以,这里有人可以告诉我颠覆的一些优点吗?

还有一个问题:

is there anything which can be done by svn, but cannot be done with git?
Run Code Online (Sandbox Code Playgroud)

svn git version-control

3
推荐指数
3
解决办法
2531
查看次数

为什么我不能结帐另一个git分支?

$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/lab_master
  remotes/origin/master

$ git checkout lab_master
error: Your local changes to the following files would be overwritten by checkou                                                                                                                           t:
        **project.properties**
Please, commit your changes or stash them before you can switch branches.
Aborting
Run Code Online (Sandbox Code Playgroud)

为什么我只是没有结账lab_master分支?

另一个问题:为什么我无法将当前文件与另一个分支中的文件进行比较?

$ git diff project.properties -b lab_master
fatal: bad flag '-b' used after filename
Run Code Online (Sandbox Code Playgroud)

git version-control git-diff git-checkout git-branch

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