V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  xiaohanqing  ›  全部回复第 1 页 / 共 5 页
回复总数  91
1  2  3  4  5  
2018-05-16 10:36:16 +08:00
回复了 whrssl 创建的主题 DNS 114.114.114.114 这个 DNS 服务器到底怎么样?
广告多的一 p
野蛮生长...
MySQL,loadCSV,6 百万行也是几分钟的事
2018-04-11 15:47:03 +08:00
回复了 newbieo0O 创建的主题 程序员 [收集帖] 大家有哪些好用的小众工具,来提高生产力
双拼输入法
2018-04-09 11:07:15 +08:00
回复了 SpaceVim 创建的主题 Vim 全民阅读 vimrc
2018-04-09 10:31:15 +08:00
回复了 SpaceVim 创建的主题 Vim 全民阅读 vimrc
@Xibuka
map <F7> mzgg=G`z
这一句有副作用,可以考虑用 winsaveview 和 winrestview 去替代 marks
2018-04-09 09:56:54 +08:00
回复了 SpaceVim 创建的主题 Vim 2018 晒晒你的 Vim 配置
2018-04-09 09:41:16 +08:00
回复了 ahonn 创建的主题 Vim 你最喜欢 / 正在使用的 Vim colorscheme 是什么?
solarized dark 半透明
2017-12-16 10:46:06 +08:00
回复了 SimbaPeng 创建的主题 PHP 哪位 PHP 大神来解答一下优先级和结合性的问题???
写这样的东西就是坑自己,研究透了有什么用,就算 !$a 先执行也不是报错啊,就是个警告
2017-10-12 09:10:05 +08:00
回复了 yehuohan 创建的主题 Vim vim 折叠问题,在编辑的时候不时地自动折叠或打开折叠
用什么 fold method ?
2017-08-26 21:19:08 +08:00
回复了 tracyone 创建的主题 Vim 把你自己写的觉得不错的 vim 脚本贴出来
@tracyone 贴一些有趣脚本出来给我玩,:D
2017-08-25 10:30:46 +08:00
回复了 tracyone 创建的主题 Vim 把你自己写的觉得不错的 vim 脚本贴出来
"vim8.0
"异步 project 搜索
function! AsyncGrep(keyword, ...)
let file = exists('a:1') ? a:1 : '*.*'

if a:keyword!~'\k' "暂时只支持关键字搜索
return 'incorrect a:keyword'
endif
if file!~'\f'
return 'incorrect file'
endif

if len(getqflist())>0
cgetexpr ""
let w:quickfix_title="searching..."
redraw
endif

let job_opt = {}
let job_opt.out_io = 'buffer'
let job_opt.out_mode = 'nl'
let job_opt.out_name = ''
let job_opt.out_msg = ''
let job_opt.out_cb = ''
let job_opt.err_cb = {job, message -> execute("echom ".string(message), "")}
let job_opt.exit_cb = function({kw, fl, job, status -> execute("
\ if exists('g:grepJobtimer')|
\ call timer_stop(g:grepJobtimer)|
\ endif|
\ let buf_line = getbufline(ch_getbufnr(job, 'out'),0, '$')|
\ let buf_line = filter(buf_line, 'len(v:val)>0')|
\ if len(buf_line)<1|
\ echo 'can not find ".kw." in ".fl."'|
\ return|
\ endif|
\ cgetexpr buf_line|
\ copen|
\ let w:quickfix_title='search ".kw."'|
\ echo 'search finish'|
\ ", "")}, [a:keyword, file])

let job_opt.close_cb = ""

if exists('g:grepJob') && type(g:grepJob)==v:t_job && job_status(g:grepJob)=='run' "防止多任务冲突
call job_stop(g:grepJob)
endif
let job_command = [&shell, &shellcmdflag]
"TODO 兼容更多的搜索工具
let re_option=''
if &grepprg=~'grep'
let re_option = '-r'
elseif &grepprg=~'findstr'
let re_option = '/S'
endif
let job_command += [substitute(&grepprg, '\$\*', '"'.a:keyword.'"', 'g').' '.re_option.' '.file]
let g:grepJob = job_start(job_command, extend(g:defaultJobOpt, job_opt))

if job_status(g:grepJob)=='fail'
return 'search fail'
endif

if exists('g:grepJobtimer')
call timer_stop(g:grepJobtimer)
endif
let g:grepJobtimer = ProgressBar('searching', '.', 3)
return 'search start'
endfunction

"进度条
function! ProgressBar(leadingMsg, marker, num, ...)
let interval = exists('a:1') ? a:1 : 700
return timer_start(interval, function({leadingMsg, maker, num, timer -> execute("
\ if mode(1)==#'R' || mode(1)=='n'|
\ let timer_info=timer_info(timer)|
\ echo leadingMsg.repeat(maker, ((9999*num-timer_info[0].repeat)%num)+1)|
\ endif|
\ ", "")}, [a:leadingMsg, a:marker, a:num]), {'repeat': 9999*a:num})
endfunction!
2017-08-24 10:43:50 +08:00
回复了 jackal 创建的主题 Vim 如何卸载/删除 Spacevim
巨烦哪些随随便便就映射快捷键的插件
2017-07-22 11:51:07 +08:00
回复了 Anybfans 创建的主题 Vim 寻一个 vim 自动居中当前行的插件
@Anybfans 具体是什么不行
2017-07-20 17:37:47 +08:00
回复了 Anybfans 创建的主题 Vim 寻一个 vim 自动居中当前行的插件
@Anybfans
试一下这样
autocmd! BufReadPost *
\ if line("'\"")>1 && line("'\"")<=line("$")|
\ execute 'normal! g`"zz'|
\ endif
2017-07-20 02:04:57 +08:00
回复了 Anybfans 创建的主题 Vim 寻一个 vim 自动居中当前行的插件
要想记住上次位置又想再次打开,可配合 autocmd 打开文件的时候自动 zz,或者使用 saveview 思路,保存视图并恢复视图
2017-07-20 02:00:54 +08:00
回复了 Anybfans 创建的主题 Vim 寻一个 vim 自动居中当前行的插件
:set so=999
你这应该描述为“使光标所在行在窗口垂直居中”,用过 excel 的人看到你这描述都会理解为“使当前行内容左右居中”这个就对应 center 命令
2017-07-20 01:47:26 +08:00
回复了 Anybfans 创建的主题 Vim 寻一个 vim 自动居中当前行的插件
:center
2017-07-12 23:52:15 +08:00
回复了 markocen 创建的主题 Vim 你用什么作为<Leader>?
我不用 leader 键
2017-06-22 12:33:38 +08:00
回复了 iesv 创建的主题 Vim 求助 vim 的中文自动折行问题?
breakat 只支持 ASCII 码,想要实现在中文句号上自动换行是不可能的
1  2  3  4  5  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5463 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 06:37 · PVG 14:37 · LAX 23:37 · JFK 02:37
Developed with CodeLauncher
♥ Do have faith in what you're doing.