0%

配置文件和快速设置

  1. PlugClean
  2. PlugInstall
  3. 去到YCM里执行
    1
    ./install.py --clang-completer --gocode-completer

安装插件管理器

1
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

安装插件

1
2
3
4
5
6
7
8
9
10
call plug#begin()
Plug 'fatih/vim-go' "go
Plug 'tomasr/molokai' "主题
Plug 'SirVer/ultisnips' "tab补全
Plug 'ctrlpvim/ctrlp.vim' "快速查文件
Plug 'Shougo/neocomplete.vim' "实时提示
Plug 'majutsushi/tagbar' "tagbar
Plug 'scrooloose/nerdtree' "导航
Plug 'vim-airline/vim-airline' "下面
call plug#end()
阅读全文 »

自己写的一个简单去除html标签(xml)的脚本

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<text font="Palatino Linotype">
<p>
<s end_audio="262" start_audio="13">
<w end_audio="94" id="0" start_audio="13" variants="mud">Mud</w>
<w end_audio="122" id="1" start_audio="95">makes</w>
<w end_audio="140" id="2" start_audio="123">my</w>
<w end_audio="215" id="3" start_audio="141">mom</w>
<w end_audio="262" id="4" start_audio="216" variants="mad">mad.</w>
</s>
</p>
</text>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import re
import sys

# how to use
# pythone a.py C6M01B1-001.xml

file = sys.argv[1]
f = open(file, 'r')

res = ""
for line in f.readlines():
#str = re.sub(r'</?\w+[^>]*>','',line)
str = re.sub(r'<(/|\?)?\w+[^>]*>','',line)
if str != '\r\n':
res = res + str
res = re.sub('\r\n',' ',res)
print res
#print "len =",len(res)

This is a blockquote.

This is the second paragraph in the blockquote.

This is an H2 in a blockquote

Some of these words are emphasized.

Use two asterisks for strong emphasis.

阅读全文 »

1
2
3
LOCAL_SRC_FILES := hellocpp/main.cpp \  
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp

换成

1
2
3
FILE_LIST := hellocpp/main.cpp    
FILE_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)

阅读全文 »

命令行:

gitbook pdf Effective-Modern-Cpp-Zh myname.pdf

如果无法生成 需要安装 calibre

安装后还要执行命令
ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin

我的第一篇博客,写点什么好呢?
希望以后能坚持写下去把.