Code Monkey home page Code Monkey logo

k-vim's Introduction

k-vim

VERSION: 9.2

LAST_UPDATE_TIME: 2017-07-29

本次更新: 小版本更新, 支持vim8异步语法检查

详细 更新日志

目标

Just a Better Vim Config. Keep it Simple.

PS: 服务器端无插件k-vim简化版本(curl直接设置vimrc即可)vim-for-server / vscode-vim配置(尽量一致的键位) k-vim-vscode

PPS: 一份tmux配置 k-tmux



截图

solarized主题

solarized

molokai主题

molokai



安装步骤

1. clone 到本地

git clone https://github.com/wklken/k-vim.git

2. 安装依赖包

2.1 系统依赖 # ctags, ag(the_silver_searcher)
# ubuntu
sudo apt-get install ctags
sudo apt-get install build-essential cmake python-dev  #编译YCM自动补全插件依赖
sudo apt-get install silversearcher-ag

# centos
sudo yum install python-devel.x86_64
sudo yum groupinstall 'Development Tools'
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install the_silver_searcher
sudo yum install cmake

# mac
brew install ctags
brew install the_silver_searcher
2.2 使用Python
sudo pip install flake8 yapf
2.3 如果使用Javascript(不需要的跳过)
# 安装jshint和jslint,用于javascript语法检查
# 需要nodejs支持,各个系统安装见文档 https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

# ubuntu
sudo apt-get install nodejs npm
sudo npm install -g jslint
sudo npm install jshint -g
sudo npm install -g eslint eslint-plugin-standard eslint-plugin-promise eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-html babel-eslint

# mac
brew install node
npm install jshint -g
npm install jslint -g
npm install -g eslint eslint-plugin-standard eslint-plugin-promise eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-html babel-eslint

3. 安装

进入目录, 执行安装
# 注意原先装过的童鞋, 重装时,不要到~/.vim下执行(这是软连接指向k-vim真是目录),必须到k-vim原生目录执行
# 会进入安装插件的列表,一安装是从github clone的,完全取决于网速, 之后会自动编译 YCM, 编译失败的话需要手动编译, 有问题见YCM文档
# 如果发现有插件安装失败 可以进入vim, 执行`:PlugInstall'

cd k-vim/
sh -x install.sh


移除安装

cd ~ && rm -rf .vim .vimrc .vimrc.bundles && cd -


常见问题

详见 wiki 以及 issues



插件

选择安装插件集合

编辑vimrc.bundles中

" more options: ['json', 'nginx', 'golang', 'ruby', 'less', 'json', ]
let g:bundle_groups=['python', 'javascript', 'markdown', 'html', 'css', 'tmux', 'beta']

选定集合后, 使用插件管理工具进行安装/更新

插件管理

使用 vim-plug 管理插件

vim-plug 常见问题: vim-plug faq / YCM timeoutYCM 国人在国内做的镜像

管理插件的命令

:PlugInstall     install                      安装插件
:PlugUpdate      install or update            更新插件
:PlugClean       remove plugin not in list    删除本地无用插件
:PlugUpgrade     Upgrade vim-plug itself      升级本身
:PlugStatus      Check the status of plugins  查看插件状态

插件列表

说明/演示/自定义快捷键等, 待处理



自定义快捷键

注意, 以下 ',' 代表<leader>
1. 可以自己修改vimrc中配置,决定是否开启鼠标

set mouse-=a           " 鼠标暂不启用, 键盘党....
set mouse=a            " 开启鼠标

2. 退出vim后,内容显示在终端屏幕, 可以用于查看和复制, 如果不需要可以关掉
    好处:误删什么的,如果以前屏幕打开,可以找回....惨痛的经历

set t_ti= t_te=

3. 可以自己修改vimrc决定是否使用方向键进行上下左右移动,默认关闭,强迫自己用 hjkl,可以注解
hjkl  上下左右

map <Left> <Nop>
map <Right> <Nop>
map <Up> <Nop>
map <Down> <Nop>

4. 上排F功能键

F1 废弃这个键,防止调出系统帮助
F2 set nu/nonu,行号开关,用于鼠标复制代码用
F3 set list/nolist,显示可打印字符开关
F4 set wrap/nowrap,换行开关
F5 set paste/nopaste,粘贴模式paste_mode开关,用于有格式的代码粘贴
F6 syntax on/off,语法开关,关闭语法可以加快大文件的展示

F9 tagbar
F10 运行当前文件(quickrun)

5. 分屏移动

ctrl + j/k/h/l   进行上下左右窗口跳转,不需要ctrl+w+jkhl

6. 搜索
<space> 空格,进入搜索状态
/       同上
,/      去除匹配高亮

(交换了#/* 号键功能, 更符合直觉, 其实是离左手更近)
#       正向查找光标下的词
*       反向查找光标下的词

优化搜索保证结果在屏幕中间

7. tab操作
ctrl+t 新建一个tab

(hjkl)
,th    切第1个tab
,tl    切最后一个tab
,tj    下一个tab
,tk    前一个tab

,tn    下一个tab(next)
,tp    前一个tab(previous)

,td    关闭tab
,te    tabedit
,tm    tabm

,1     切第1个tab
,2     切第2个tab
...
,9     切第9个tab
,0     切最后一个tab

,tt 最近使用两个tab之间切换
(可修改配置位 ctrl+o,  但是ctrl+o/i为系统光标相关快捷键, 故不采用)

8. buffer操作(不建议, 建议使用ctrlspace插件来操作)
[b    前一个buffer
]b    后一个buffer
<-    前一个buffer
->    后一个buffer


9. 按键修改
Y         =y$   复制到行尾
U         =Ctrl-r
,sa       select all,全选
gv        选中并高亮最后一次插入的内容
,v        选中段落
kj        代替<Esc>,不用到角落去按esc了

,q     :q,退出vim
,w     :w, 保存当前文件

ctrl+n    相对/绝对行号切换
<enter>   normal模式下回车选中当前项

更多细节优化:
    1. j/k 对于换行展示移动更友好
    2. HL 修改成 ^$, 更方便在同行移动
    3. ; 修改成 : ,一键进入命令行模式,不需要按shift
    4. 命令行模式 ctrl+a/e 到开始结尾
    5. <和> 代码缩进后自动再次选中, 方便连续多次缩进, esc退出
    6. 对py文件,保存自动去行尾空白,打开自动加行首代码
    7. 'w!!'强制保存, 即使readonly
    8. 去掉错误输入提示
    9. 交换\`和', '能跳转到准确行列位置
    10. python/ruby 等, 保存时自动去行尾空白
    11. 统一所有分屏打开的操作位v/s[nerdtree/ctrlspace] (特殊ctrlp ctrl+v/x)
    12. ',zz' 代码折叠toggle
    13. python使用"""添加docstring会自动补全三引号
    14. Python使用#进行注释时, 自动缩进


UPDATE_LOG

version 9.2

插件部分:
1. 增加 w0rp/ale 异步语法检查插件, 用户vim版本为8.0时自动启用. 非8时, 启用默认scrooloose/syntastic, 两套插件快捷键一致
2. 切换使用flake8作为python风格检查(pip install pep8)
3. 启用yapf作为python代码格式化(pip install yapf)
4. 启用eslint作为javascript代码检查
5. YCM 设置回车选中不再弹补全框

细节:
1. 新增快捷键 gv 选中并高亮最后一次插入的内容

Contributors

thx a lot. 可以给我提pull request:)

查看详情 git-contributors

Inspire

  1. vimrc文件布局vimrc+vimrc.bundles配置方式参考 maximum-awesome

  2. install.sh 参考spf13-vimbootstrap.sh spf13-vim

  3. 插件管理使用Vim-plug

  4. 自动补全 YCM

  5. 插件挑选 VimAwesome

Resources

链接

Donation

如果你认为对你有所帮助, You can Buy me a coffee:)

donation

Stargazers over time

Stargazers over time



The End!

wklken (凌岳/pythoner/vim党预备党员)

Github: https://github.com/wklken

Blog: http://www.wklken.me

2013-06-11 于深圳

k-vim's People

Contributors

a0726h77 avatar bfwg avatar brain-zhang avatar chengui avatar fangwentong avatar favoorr avatar kchen0x avatar lau-jay avatar lord63 avatar losingle avatar maogm12 avatar menduo avatar ruanyl avatar shinux avatar spacewander avatar wklken avatar yimun avatar zhoudayang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

k-vim's Issues

保存vimrc时提示func SetTitle() 函数已经存在

你好,我又来了~
我安装后只修改了powerline的symbols设置,其他都没动,然后保存的时候提示这个东西:

处理 /home/singlepig/.vimrc 时发生错误:
第  761 行:
E122: 函数 SetTitle 已存在,请加 ! 强制替换
E122: 函数 SetTitle 已存在,请加 ! 强制替换
请按 ENTER 或其它命令继续

这个函数是这样的:

func SetTitle()                                                                                                                       
    "如果文件类型为.sh文件
    if &filetype == 'sh'
        call setline(1, "\#!/bin/bash")
    endif

    if &filetype == 'python'
        call setline(1, "\#!/usr/bin/env python")
        call append(1, "\# encoding: utf-8")
    endif

    normal G
    normal o
    normal o
endfunc

我不懂viml,但是看你前面的一些函数的定义,比如233行:

func! DeleteTrailingWS()                                                                                                          
   exe "normal mz"
   %s/\s\+$//ge
   exe "normal `z"
endfunc

多个啊?
我加上之后保存好像就不提示那个问题了,不知是否本就该加上呢,还是我的情况比较特设?
我用的是64的mint 16

YouCompleteMe编译依赖的说明

最好更新下README的第2步,加上编译YouCompleteMe的依赖
对于Linux:
sudo apt-get install build-essential cmake python-dev

排除版本不支持问题,sh -x install.sh经常会因为上述原因失败

f2关闭/开启行号的问题

vimrc 配置中,你那个方法,F2关闭行号的
""为方便复制,用开启/关闭行号显示:
function! HideNumber()
if(&relativenumber == &number)
set relativenumber! number!
elseif(&number)
set number!
else
set relativenumber!
endif
set number?
endfunc
nnoremap :call HideNumber()
按几次就会出现行号错乱了
其实 一句话就可以搞掂了
nnoremap :set nonumber! :set foldcolumn=0
这样就好了,这样切换之后,行号的顺序也不会改变
(难道我理解错了?)

mac 下,打开后直接退出

".vimrc" 508L, 14108CFatal Python error: PyThreadState_Get: no current thread
Vim: Caught deadly signal ABRT

Vim: Finished.
Abort trap: 6

安装时与要github帐号,密码??

你好,我在安装的时候发现有一个地方要输入github的帐号密码,请问这是正常的么?还是我本身的问题?
2014-01-08 10 05 48
图是我重新安装的图,第一次输了好像没对。

不知道为什么,又没法补全python模块了

首先说明的是我用的不是vim,而是macvim,因为用vim是完全无法使用的,主要是YCM的问题,会提示以下错误:

Vim: Caught deadly signal ABRT
Vim: Finished.
Abort trap: 6

所以我其实用的是macvim的console版本。

然后一开始使用是没问题的,似乎是在某一次我用vundle对所有插件进行一次检查更新之后就没发进行python的模块补全了。
我尝试过以下办法:

  1. 更改使用最原先的vimrc配置
  2. 删除YCM插件,重新用vundle装
  3. 删掉整个k-vim目录,重新clone再安装

都没办法实现python的模块补全了。请问是需要做什么配置么?

7.0 版本安装出错

设备:2013 rmbp 13'
vim 版本:VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 26 2014 06:51:30)

出错信息如下:

image

打个tag吧

不然想回退还要看git log,log 貌似也不全。。。

不支持ctags吗?

您好,请教个问题,我想在跳转到变量的定义处,用ctags的快捷键(CTRL+])不管用,请问是怎么回事

待处理问题: vim-expand-region没有找到合适的键位

目前使用-/+, 之前版本有用过-/=, 会导致自动缩进键位被占用
这个功能蛮常用的, 但是不够便捷, 要shift+键位
不知道大家配置的键位是什么? 有没有更合适的

Bundle 'terryma/vim-expand-region'
" TODO: 找到一个 易用的key
map + <Plug>(expand_region_expand)
map _ <Plug>(expand_region_shrink)

自动补全引号

"自动补全单引号,双引号等 Bundle 'underlog/ClosePairs'
Bundle 'Raimondi/delimitMate'
这个插件在使用的时候,会出现以下问题:
i < 10;
他会自动加入<> ,应该如何处理啊?

使用ag作为CrtlP的搜索引擎

ag速度暴快
参考:https://github.com/thoughtbot/dotfiles/blob/master/vimrc
https://github.com/ggreer/the_silver_searcher

" Use The Silver Searcher https://github.com/ggreer/the_silver_searcher
if executable('ag')
  " Use Ag over Grep
  set grepprg=ag\ --nogroup\ --nocolor

  " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
  let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'

  " ag is fast enough that CtrlP doesn't need to cache
  let g:ctrlp_use_caching = 0
endif

我觉得这是个非常好的设置,不搜索.gitignore里面忽略的文件,不用缓存。
我就不提pull requests了哈

更新了一下设置tabsize的方法

一段废话:
因为这几天开始用ruby (我用两个空格作为一个tab 缩进)
更方便的控制tab表示的空格数

所以写了一个(TAB)函数,接受一个整数表示(tab)空格数
并做好相应(tabstop; shiftwidth; softtabstop)设置
之后根据文件类型, 设置了几个默认值
example:

autocmd FileType ruby :call TAB(2)

(上面都是废话 :p

我现在想给你提交一个pull, 不过我的配置有太多改动...
有什么方法可以只提交一部分修改吗....?

如果嫌麻烦就直接close掉这个issue吧....

说明中对于这句话不是很理解

快捷键为插件默认/或者当前配置vimrc定义的,如果需要修改,查看vimrc中对插件配置进行修改 [sd]为自定义 [d]为默认
请问这个是什么意思
[d] 这个要怎么调用?

关于powerline和airline

我在windows上用powerline不兼容,试了下airline,感觉airline好多了

airline除了有powerline的功能还有buffer explorer的功能,minibufferexpl也可以不要了,而且风格更统一

make YouCompleteMe failed

我再CentOS6.2环境中安装失败了。
看日志应该是YouCompleteMe编译失败。
下面是复制的部分出错日志。

  • [[ Linux == \D\a\r\w\i\n ]]

  • cmake -G 'Unix Makefiles' -DUSE_CLANG_COMPLETER=ON . /root/k-vim-master/bundle/YouCompleteMe/cpp
    -- The C compiler identification is GNU 4.4.6
    -- The CXX compiler identification is GNU 4.4.6
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    Your C++ compiler does NOT support C++11, compiling in C++03 mode.
    -- Found PythonLibs: /usr/lib64/libpython2.6.so (found suitable version "2.6.6", minimum required is "2.6")
    Downloading Clang 3.4
    CMake Error at ycm/CMakeLists.txt:66 (file):
    file DOWNLOAD HASH mismatch

    for file: [./clang+llvm-3.4-x86_64-unknown-ubuntu12.04.tar.xz]
    expected hash: [6077459d20a7ff412eefc6ce3b9f5c85]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]

xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now

NERDTree加载后怎么默认不显示

我以前自己配置的时候,没有用Bundle,

虽然可以用这个插件,但是并不会每次都自动打开,,但是我看了这个的配置,好像用Bundle启动NERDTree的时候就自动显示了左边那个东西..

如果不Bundle nerdtree,,又不会加载这个插件,,很烦恼

待处理问题: 快速运行当前代码

如何快速运行代码?

目前只配置了运行python代码

想支持ruby/shell等等所有脚本

看到一个插件, 但是不是很满意, 需要寻找更合适的


" Bundle "thinca/vim-quickrun"
" nnoremap <F10> :QuickRun<cr>

rainbow_parentheses.vim

你好
这个rainbow_parentheses.vim插件默认只有()有色彩,如何将所有的都加入色彩啊,,
现在我只能在vim里面的命令模式下,输入: RainbowParenthesesLoadSquare 才能将【】变为彩色 谢谢

Ctrl+l切换以及关闭vim的问题

  1. ctrl+l快捷键有两处使用,建议切屏时使用该键位,切换最近使用的tab时改成ctrl+o
  2. 当我打开多个tab时,使用,q或是:q都只会关闭当前tab,请问有什么方法能关闭所有tab退出vim

vim7.4下相对绝对行号切换不正常

好像在vim7.4里面直接用C-n切换不到绝对行号,并且F2隐藏行号也会失败,我做了如下修改,即在切换时要先关闭当前状态在进行设置

set relativenumber
au FocusLost * :set norelativenumber number
au FocusGained * :set nonumber relativenumber
" 插入模式下用绝对行号, 普通模式下用相对
autocmd InsertEnter * :set norelativenumber number
autocmd InsertLeave * :set nonumber relativenumber
function! NumberToggle()
    if(&relativenumber == 1)
       set norelativenumber
       set number
    else
       set nonumber
       set relativenumber
    endif
endfunc
nnoremap <C-n> :call NumberToggle()<cr>

隐藏行号的按键映射也改了

nnoremap <F2> :set norelativenumber nonumber! number?<CR>

Ctrl+l冲突问题

Ctrl+l定义了两个用途:

  1. 上下左右窗口跳转,不需要ctrl+w+jkhl;
  2. 最近使用两个tab之间切换;

导致冲突,其中1没效了,建议将2设置用Ctrl+o。

cursorcolumn不起作用

我在Mac下,使用Iterm2时,cursorcolumn无论在任何colorscheme下都不起作用。但是在gui(macvim)下就可以。我的vim用的是macvim的cmd版本。请问你有遇到过这样的情况么?我看到你的截图上用的似乎也是mac。

输入中文时YCM报错

输入中文时报错,似乎和 YCM 有关

IndexError: bitset::set: __position (which is 18446744073709551590) >= _N b (which is 128)

Debian VIM - Vi IMproved 7.4

楼主能不能支持Bundle 'wesleyche/SrcExpl'

楼主能不能把插件也做进去啊,这样可以支持代码预览, 并且在节目上显示的时候,能不能让代码预览窗口和quickfix窗口在同一行啊。Bundle 'wesleyche/SrcExpl'

vim-gocode不能补全代码

vim-gocode不能补全代码。 https://github.com/Blackrush/vim-gocode 有以下说明:

You should not install this plugin with either fsouza/go.vim or jnwhiteh/vim-golang! It could take unknown effect on your setup.

我注释了下面一行后, 代码补全就正常了。
Bundle 'jnwhiteh/vim-golang'

server 编译 ycm 不过

我在本机编译没有问题,但是在 linode 的 debian 服务器上,到编译 ycm 的时候始终会卡在这一步,耗尽内存后中断,我暂时禁用了 ycm,但想知道你知不知道产生这步问题的原因?

+ make -j 8 ycm_support_libs
Scanning dependencies of target BoostParts
[  0%] [  1%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/system/src/error_code.cpp.o
[  1%] [  2%] [  3%] [  3%] [  4%] [  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/exception/src/clone_current_exception_non_intrusive.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o
[  5%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o
[  6%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o
[  6%] [  8%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o
[  9%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o
[  9%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o
[ 10%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o
[ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o
[ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o
[ 12%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o
[ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o
[ 13%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/posix_time/posix_time_types.cpp.o
[ 14%] [ 16%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_weekday.cpp.o
Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make[3]: *** [BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o] Error 4
make[3]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make[3]: *** [BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o] Error 4
make[2]: *** [BoostParts/CMakeFiles/BoostParts.dir/all] Error 2
make[1]: *** [ycm/CMakeFiles/ycm_support_libs.dir/rule] Error 2
make: *** [ycm_support_libs] Error 2
+ [ ! -d /tmp/vimbk ]
+ [ ! -d /tmp/vimundo ]
+ echo Install Done!
Install Done!

A few suggests

  1. set a longer timeoutlen. 0.5 second is a little short
set tm=1000

2.set t_ti= t_te= is annoying . Vim has permanent undo history.

  1. If you want to map ctrl + space to ?
use map <c-@> ?
  1. duplicate
set showcmd
  1. pastetoggle comment mistake, should be

YouCompleteMe无法自动补全python模块和方法

我发现我的YCM没法自动补全python模块和方法,是还有什么配置要改么?我google了很久没找到对应的解决办法,只能请教你了,谢谢。具体的情况如下:http://ascii.io/a/3938, 可以看到当我输入import os.的时候,并不会弹出os下所包括的模块。我看到网上有人说需要在vimrc设置

let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'

但我没有看到你的vimrc中有设置。我自己加上去了也没有起作用。

待处理问题: endwise插件冲突问题[ruby]

在学习ruby, 一直手动敲end表示很苦逼, endwise整合进来存在冲突, 会导致
敲回车出现一行不该出现的字符串

应该是和ycm/ultisnips存在冲突, 暂时没有找到处理方式.....待处理, 不知道rubyer怎么处理这个问题的

YouCompleteMe编译不过

环境:ubuntu13.10 , vim7.4, python 2.7.5

编译时的错误:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: 错误的值
collect2: error: ld returned 1 exit status
make[3]: *** [/home/danny/Download/YouCompleteMe-master/python/ycm_core.so] 错误 1
make[2]: *** [ycm/CMakeFiles/ycm_core.dir/all] 错误 2
make[1]: *** [ycm/CMakeFiles/ycm_core.dir/rule] 错误 2
make: *** [ycm_core] 错误 2

不知道什么问题,求帮助

待处理问题: '#'操作细节

#号查找时第一个不往下走, 其实我大多数时候只想看下光标下变量在哪些位置出现而已, 不需要跳到下一个, 第一次不跳, 按n/N再开始跳.....目测要写脚本实现

'#'在写注释的时候, 默认是忽略排版的, 每次都跳到行首, 苦逼地排版移动到合适的位置
或者干脆先写注释完再加'#', 需要看下能不能解决这个问题

JavaScript补全用不了

  • OS: Debian sid i686
  • 安装了tern_for_vim插件
    (在bundle/tern_for_vim目录下执行过npm install, 没有报错 安装了tern 5.0)
  • YCM补全python和C/C++能正常工作

打开js文件, 进行任何补全都是"找不到模式"
使用Ctrl+Space 调用Tern#Complete会报错:

处理 function tern#Complete 时发生错误:                                                                                   
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "/home/jinduan/workspace/dotfile/vim/k-vim/bundle/tern_for_vim/script/tern.py", line 231, in tern_ensureCompletionC
   {"line": curRow - 1, "ch": curCol})
 File "/home/jinduan/workspace/dotfile/vim/k-vim/bundle/tern_for_vim/script/tern.py", line 152, in tern_runCommand
   port, portIsOld = tern_findServer()
 File "/home/jinduan/workspace/dotfile/vim/k-vim/bundle/tern_for_vim/script/tern.py", line 70, in tern_findServer
   return (tern_startServer(project), False)
 File "/home/jinduan/workspace/dotfile/vim/k-vim/bundle/tern_for_vim/script/tern.py", line 83, in tern_startServer
   stderr=subprocess.STDOUT, shell=win)
 File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
   errread, errwrite)
 File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
   raise child_exception
OSError: [Errno 2] 没有那个文件或目录

google不到什么相关问题...
文档里也没说会有这种情况的样子...
tern_for_vim 的issue貌似也没看到和我情况相似的...0r2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.