Giter VIP home page Giter VIP logo

vim-init's People

Contributors

phiysng avatar skywind3000 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

vim-init's Issues

直接换到neovim

各位在云里雾里试着看懂这份配置的vim新手,建议直接切换到neovim,这里的大部分配置都是默认的不需要去设置。请跟上趋势,享受更现代化的vim好吗。readme里批评建映射的我真是醉了。。。

【问题】安装 YCM 后,部分系统上使用 ESC 键从插入模式返回正常模式有延迟。

如题,具体表现为按下 ESC 键,大约需等待 1 秒左右的时间,此时可以正常插入,但会停止退出正常模式。此外,可以通过连按两次 ESC 键来立即切换回普通模式。

这个问题在 Ubuntu 18.04 上并不会出现,而在 openSUSE 15 上会出现。vim 使用的是系统软件源的vim。

初学 vim ,还不是很懂。希望大神可以抽空解答一下,谢谢!

END和HOME键的问题

新手请教大佬。个人比较习惯单按home和end键跳转行尾行末的操作,pluginstall之后,进入插入模式按了end或者home会出现乱码(控制字符?),有办法让这两个键起作用吗?我试了unmap<end> , inoremap<end> xxx 这些都没有起作用。

leader 键位设置

把 Leader 定义成空格,同是 绑定 imap 组合按键时,vim 需要等待到 timeoutlen 才明白输入的是一个 normal 的空格键位, 在这种情况下导致输入后没有即使反馈,感觉影响到了写入速度,请问有什么方式能够解决这个问题?

mac pro 快捷键 issue

这两行为什么在iterm2里面失灵?我的left option 好像map在esc+, left option-> right option->也没有map其它键
noremap :call Tab_MoveLeft()
noremap :call Tab_MoveRight()

奇怪的是下面选tab是work的
noremap :tabn 1
noremap :tabn 2
noremap :tabn 3
noremap :tabn 4
noremap :tabn 5
noremap :tabn 6
noremap :tabn 7
noremap :tabn 8
noremap :tabn 9
noremap :tabn 10

请教一个问题,读取 .ycm_extra_conf.py 中相应的编译参数设置到 ALE 出现的一个问题

" 取得本文件所在的目录
let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')

" 定义一个命令用来加载文件
command! -nargs=1 LoadScript exec 'so '.s:home.'/'.'<args>'

" 将 vim-init 目录加入 runtimepath
exec 'set rtp+='.s:home

" 将 ~/.vim 目录加入 runtimepath (有时候 vim 不会自动帮你加入)
set rtp+=~/.vim

let g:devrte_vim_plug_path='/opt/devrte/runtime/vim-conf/vim-plug'

" 加载Skywind3000 的脚本
LoadScript vim-init/init.vim

python3 << EOF

import sys
import vim
import importlib

try:
	module = importlib.machinery.SourceFileLoader("aaa", "./.ycm_extra_conf.py").load_module()

	flags = module.FlagsForFile("a.cpp")["flags"]
	
	cflags   = vim.eval("g:ale_c_gcc_options")
	cppflags = vim.eval("g:ale_cpp_gcc_options")
	
	for flag in flags:
		if flag[0:2] == "-I":
			if flag.find("llvm") == -1:
				cflags   = cflags + " "
				cflags   = cflags + flag
				cppflags = cppflags + " "
				cppflags = cppflags + flag
	
	vim.command("let g:ale_c_gcc_options = '%s'"% cflags)
	vim.command("let g:ale_cpp_gcc_options = '%s'"% cppflags)

except Exception as e:
	exit

EOF

我写了上边这个脚本,就是用于读取 .ycm_extra_conf.py 的一些编译信息设置到ALE中,总是出现下边这个错误:

No module named 'ycm_core'

将 .ycm_extra_conf.py中import ycm_core 去掉就没有问题了

是我这个脚本先于YCM加载的原因吗

init-plugins.vim格式问题

对有些插件,在plug#begin和plug#end之间增加配置代码好像会出现找不到变量或者函数的问题,我添加了
``
if index(g:bundle_group, 'ycmd') < 0
" Plug 'maralla/completor.vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-buffer.vim'
endif
" asyncomplete {
let g:asyncomplete_remove_duplicates = 1
call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'buffer',
\ 'whitelist': ['*'],
\ 'blacklist': ['go'],
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ }))

autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
" }
``
后面会说找不到asyncomplete#sources#buffer#get_source_options函数,放到plug#end后面就好了,之前彩虹括号也遇到配置问题,这是plug插件的问题吗,但有些配置又没有问题

如何添加或关联其他文件夹的代码

假设我的文件目录:

.
├── rtthread-nano // 这是操作系统的源码
│   └── rt-thread
└── test // 这是应用层代码,这些代码依赖rtthread-nano

test的目录中已经有.git或.root了,所以根据规则,test的目录就已经是顶层目录了。

所以我的疑问是,如何在test这个目录中编码时让他自动关联rtthread-nano这里的源码?

建议去除README中关于<Leader>描述

总之,山寨居多,还有某些著名的广为流传的 Vim 配置,我都不想点名了,把 Leader 键映射成逗号了,它不知道逗号/分号在 Vim 里是用来定位 f/t 搜索的下一个/上一个结果的么?就和 n/N 定位斜杠搜索一样。把 Leader 定义成空格我都还觉得挺科学,定义成逗号和分号的这些配置,是在把错误的用法源源不断的交给未来的新用户。

大部分拥有并维护了自己Vim配置的人都知道 ,; 的作用,但是依然采用 , 作为 <Leader> 键映射的原因在于, , 键相比其他键影响最小且有着好的人体工程学体验(用过都知道吧。。。,并且 f/t 的行内搜索使用率相比 <Leader> 键是要小的,而,搜索上个结果的使用率就更小了,再并且,把 , 绑定<Leader> 键依然不影响原来功能,只是需要等待个 timeout 时间,所以这也是网络上大部分都是把 , 作为自己的 <Leader> 键。

综上,你上面的描述实在不是很恰当。

echodoc不能显示函数参数

vim 8.1.513 compile with python3,最新的
echodoc 最新的,f16ae31b7b9d8429cb0579ba104db0d0951c40224
ycm 最新的,faa019aa532475c5028527ffbfe1e910119d663c

@skywind3000 你的echodoc, ycm的版本是多少

计算路径的有bug

应该得到的是vim-init/tools/conf
但是脚本中实际算成了vim-init/init/tools/conf,这样就找不到那个配置了。

一些见解

Hi 大佬。知乎 v2ex拜读过您的一些文章很受用。对大佬的造诣也是很认可。关于逗号和空格作为leader 。我觉得没那么过激的,用逗号也不是错误。可能不常使用f/t的 下一个。所以使用逗号。我曾经翻阅了不少大佬的配置 例如 Shougo 等。空格和逗号都有的。感觉直接否定用逗号做空格是错误的不太好=3=。

合入配置后,需要按两次Esc键才能从insert模式退回到normal模式

我把init-config.vim这个文件合入到我的vim配置中,出现标题中描述的现象。第一次按下Esc的时候如果时间等待稍长一些(1S)才能恢复正常模式,如果快速按下Esc和其他字母按键,会出现一些奇怪的字符。我已经设置ttimeoutlen值为50了。

排查原因是【终端下允许 ALT,详见:http://www.skywind.me/blog/archives/2021】这段配置引起的,注释掉就好了。

另外请教一个问题,wiki中介绍有一句话不明白:
【前面在终端软件里配置好 ALT键,但是 Vim 的话,由于历史原因,需要在你的 vimrc 里加一段键盘码配置】
这里的历史原因是什么,为什么需要另外配置。
还有config.vim中【功能键终端码矫正】是为什么,我以前没有矫正也可以映射相关按键。

我的vim使用环境是:
1.putty连接本地ubuntu虚拟机。
2.ubuntu系统

E518: 未知的选项: signcolumn=yes

您好,感谢您的分享
有个问题请教一下,signcolumn这个是什么?我使用的是默认的7.4版本,跟这个有关系吗?

[00:34:18@zhubo ~]$vim test.c 
处理 /home/zhubo/vim-init/init/init-style.vim 时发生错误:
第   23 行:
E518: 未知的选项: signcolumn=yes
请按 ENTER 或其它命令继续

submodule issue

当工程中有git submodule 时,在submodule中找代码根指的时submodule的根,无法找到指外的代码,有好的解决方案吗?

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.