惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
P
Palo Alto Networks Blog
月光博客
月光博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
aimingoo的专栏
aimingoo的专栏
腾讯CDC
T
Threatpost
D
DataBreaches.Net
Vercel News
Vercel News
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
Forbes - Security
Forbes - Security
U
Unit 42
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
O
OpenAI News
量子位
TaoSecurity Blog
TaoSecurity Blog
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Visual Studio Blog
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
The Last Watchdog
The Last Watchdog
S
Security Affairs
Attack and Defense Labs
Attack and Defense Labs
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
小众软件
小众软件
S
SegmentFault 最新的问题
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
AI
AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 聂微东
I
Intezer
Know Your Adversary
Know Your Adversary
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
博客园_首页
NISL@THU
NISL@THU
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

夜行人

回家路上 第一期的直播演示项目 震动检测器 正能量 在线参观CodeLab Neverland 发布 CodeLab Adapter 3.3.1 DynamicTable 之 纸糊方向盘 CodeLab DynamicTable: 一个可实施的技术方案 CodeLab Insight 发布 Alpha 版 情人节 Home Assistant 周报 && IoT 周报 (02) Joplin: 关注隐私的 Evernote 开源替代软件 浏览器的未来与 Web 传感器 Home Assistant 周报 && IoT 周报 (01) 百宝箱(01) 论自由 介绍 WebThings Home Assistant 周报 && iot 周报 (00) 百宝箱(00) 毛姆读书心得 传世之作 周末徒步 CodeLab Adapter ❤️ Jupyter/Python 航班 躲雨 夏令营途中 [译]思想--作为一种技术 The future of coding 美国之行 三门问题的程序模拟 从Python转向Pharo https://blog.just4fun.site/post/iot/iot-open-source-projects/ Python异步编程笔记 https://blog.just4fun.site/post/iot/iot-open-source-hardware-community/ 万物积木化开发者社区 CodeLab ❤️ Blender Scratch3技术分析之云变量 API(第7篇) [译]对管道(Pipes)的偏爱 [译]提出正确的问题比得到正确答案更重要 蓝牙设备与Scratch3.0 创建你的第一个Scratch3.0 Extension Scratch3技术分析之项目内部数据(第6篇) Scratch3技术分析之社区 API(第5篇) Scratch3技术分析之User API(第4篇) Scratch3技术分析之项目主页API(第3篇) Scratch3技术分析之静态资源API(第2篇) Scratch3.0、micro:bit与Windows7 https://blog.just4fun.site/post/iot/zerynth-vs-micropython/ 核聚变、方所与半宅空间 可视化编程为何是个糟糕的主意 codelab.club周末聚会 关于codelab.club '下一件大事'是一个房间 Hungry Robot - Eat everything 编程作为一种思考方式 今日简史 史蒂夫·乔布斯传 罗素自选文集 https://blog.just4fun.site/post/edx/tianjin-scratch-ai/ https://blog.just4fun.site/post/edx/richie-cms-openedx/ 徒步武功山 WebUSB与micro:bit 积木化编程与3D场景 夜宿武功山顶 scratch3-adapter接入优必选Alpha系列机器人 https://blog.just4fun.site/post/edx/video-migration-note/ scratch3-adapter重构笔记 https://blog.just4fun.site/post/edx/edx-community-members/ 两种硬件编程风格的比较 使用micro:bit自制PPT翻页笔 柏拉图对话集 scratch3.0 + micro:bit 七月电影放映计划 非营利组织的管理 Screenly--用树莓派让任何屏幕变为可编程的数字标牌 以最佳实践开始你的Django项目 micro:bit与事件驱动 为Scratch3.0设计的插件系统(上篇) OCR应用一例 近两年读过的一些好书 blockly开发之使用python驱动浏览器中的turtle(2) 牛顿新传 文学理论入门 逻辑的引擎 人生的意义 blockly开发之生成并运行js代码(1) blockly开发之hello world(0) micro:bit使用笔记 神器之Termux https://blog.just4fun.site/post/iot/micropython-notes/ Cozmo what is this Scratch的前世今生 下段旅程 我行在远方 爆裂 途中杂记 https://blog.just4fun.site/post/edx/open-edx-startup/ cozmo系列之入门 - 有性格且可编程的机器人 PaperWeekly开发笔记 创业二三事
我的vim/mavim/neovim配置
2016-06-26 · via 夜行人

文章目录

历史负担

之前用的配置是wklkenk-vim,wklken的vim插件相关的文章写得很棒

近来觉得vim打开速度慢的让人无法忍受,想来是配置(插件)造成的,于是在目录中频繁打开关闭的文件偏好用sublime来编辑了

可我对sublime的快捷键总也记不住,用了就丢那种,连跳转到行的快捷键都记不得,全局替换也要去按按钮,手指远远跟不上脑袋,有种播放视频卡顿的感觉,很是不爽。想想还是重写把vim配置好划算些。

需求分析

我发现实际上k-vim的大多配置,对我而言是多余的,而许多配置,又不舍得任,不妨从这里入手,只挑出非用不可的特性,翻wklkenk-vim博客,恰好看到他的这篇文章:一些VIM的个性化配置,里边把定制配置分条整理了,按需索取就行,我尽量少选

先列出我偏好的配置,之后给出配置文件

  • 更改leader键
  • 移动时, 保留到底部的空间
  • 自定义代码折叠toggle
  • ctrl-n进行相对行号/绝对行号切换
  • 打开vim, 自动定位到上次最后变更位置
  • F键区的映射
  • 分屏窗口切换时, 直接使用ctrl-h/j/k/l
  • leader-/ 关闭掉上次搜索的高亮
  • Python 写入注释#号时, 不每次都跳到行首
  • 强制保存:w!!, 没权限的时候
  • 保存文件时, 自动移除多余空格
  • shell和python文件新建时, 自动插入行头
  • 启动的时候不显示那个援助索马里儿童的提示
  • 退出vim后,内容显示在终端屏幕

####常用插件 首先是插件管理

我们采用Vundle.vim,之前的gmarik/vundle

使用方法很简单,先git clone到本地git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

在配置文件里加上

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
:::text
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

以及我需要使用一些常见插件

1
2
3
4
5
6
7
:::text
Plugin 'scrooloose/nerdtree'
Plugin 'davidhalter/jedi-vim'
Plugin 'scrooloose/syntastic'
Plugin 'msanders/snipmate.vim'
Plugin 'mattn/emmet-vim'
"Plugin 'Valloric/YouCompleteMe' "YouCompleteMe编译比较麻烦,选用

安装插件只需要":PluginInstall"

插件笔记

youcomplateme

youcomplateme值得学习

Vim自动补全神器:YouCompleteMe

ps:在我的环境里,需要进入virtualenv里才正常(这是我的个人笔记)

jedi-vim

jedi-vim 能智能理解python代码

1
2
3
4
5
6
7
8
:::text
Completion <C-Space>
Goto assignments <leader>g (typical goto function)
Goto definitions <leader>d (follow identifier as far as possible, includes imports and statements)
Show Documentation/Pydoc K (shows a popup with assignments)
Renaming <leader>r
Usages <leader>n (shows all the usages of a name)
Open module, e.g. :Pyimport os (opens the os module)

jedi-vim 可以在写python时拥有ipython的感觉,K文档查询

macvim

想用macvim的动机是,鼠标的移动能力是目之所及,即可操作,一些非批量化,零碎的任务是很适合用鼠标的,诸如移动到某个位置,切换版块,跳到tab标签,菜单功能。免去记忆很多实用频率不高,记了又忘的快捷键。同时不丧失vim的编辑优势,我可能没有十分强烈cui的原教旨倾向,在工具这方便大概算是实用主义者吧。我想用macvim这种带有gui功能的编辑器,使用场景主要是在gui文件夹中临时想编辑文件时。

neovim

使用neovim则是,反正都要重新配置,不如换用为新世纪倒灶的neovim,甩下vim的历史包袱,由于neovim和vim配置基本相同,所以neovim的配置和vim重叠,并不带来新的学习成本

配置文件:~/.config/nvim/init.vim

配置文件和文档

具体的配置文档可以参考/wwj718-vim),里边给出了使用的细节

文章作者 种瓜

上次更新 2016-06-26