sublime setting - achishis2/achishis2.github.io GitHub Wiki
-
ubuntuμ ctag, cscope μ€μΉ(vim_ctags_cscope.pdf) >> vi λ‘λ§ μμ νμ€ λΆλ€μ ν΄λΉνμΌ κΉμ§λ§ 보μλ©΄ λ©λλ€.
-
sublime text 3 μ€μΉ > http://www.sublimetext.com/3
2.1 package controll μ€μΉ > https://packagecontrol.io/installation
2.2 sublime > preference > package control or Ctrl+shift+p package control: install package ν΄λ¦
2.3 ctags plugin κ²μ & μ€μΉ
2.4 cscope plugin κ²μ & μ€μΉ
- ctag indexing λ°©λ²
3.1 m40 μμ€ν΄λ μ μΌ μμλ‘ μ΄λνμ¬ μλ 컀맨λ (λ³ΈμΈμ΄ μνλ μ·¨ν₯μ λ°λΌ exclude μΆκ° κ°λ₯)
ctags --languages=c++ --exclude=.git --exclude=build --exclude=out -R -f .tags
- cscope
4.1 μμ λμΌν μμΉμμ μλ컀맨λ ν΅ν΄ cscope νμΌ μμ±
find . -type f -and \( -name "*.c" -o -name "*.h" -o -name "*.cc" -o -name '*.cpp' -o -name '*.s' -o -name 'S' -o -name 'mm' \) -print > cscope.files
4.2 db νμΌ μμ±
cscope -i cscope.files
- sublime text νλ‘μ νΈ μμ±
5.1 sublime text μ€νμν¨ μνμμ μμμ μκΈ°ν μ΅μμ ν΄λλ₯Ό drag & drop
5.2 project > save project as νμ¬ μνλ μμΉμ νλ‘μ νΈ νμΌ μ μ₯ (μ : test.sublme-project)
5.3 close project
5.4 File > open file νμ¬ 5.2μμ λ§λ νλ‘μ νΈ νμΌ(test.sublme-project) μ΄μ΄μ μλμ κ°μ΄ μμ
{
"folders":
[
{
"follow_symlinks": true,
"path": "src", // m40 betaμ μ΅μμ ν΄λλ‘ μ§μ
"file_exclude_patterns": [
"*.vcproj",
"*.vcxproj",
"*.sln",
"*.gitignore",
"*.gitmodules",
"*.vcxproj.*"
],
"folder_exclude_patterns": [
"build",
"out",
".git",
"Debug",
"Release"
]
}
],
"settings": {
"ctags_extra_tag_files": [
"/home/tk/workspace/ct/beta/m42_2311_t/src/.tags" // 3.1 μμ indexingν ctag νμΌ κ²½λ‘λ‘ μ€μ
]
}
}
5.5 νμΌ μ μ₯ν νλ‘κ·Έλ¨ μ’ λ£
5.6 Project > Open project ν΅ν΄ νλ‘μ νΈ μ€ν
νλ² μ μ ν΄λμΌλ©΄ νλ‘μ νΈ κ΄λ ¨ν΄μλ μμ ν κ²μ΄ μκ³ νΉμ μμ€μ½λκ° μΆκ°λ¬κ±°λ baseκ° λ°λμμ κ²½μ°, 3λ² & 4λ²λ§ command λ₯Ό ν΅ν΄ sync λ§μΆ° μ£Όμλ©΄ λ©λλ€.
- μ¬μ©λ²
6.1 preferences > Package Setting > CTags > Key binding - user, Mouse binding - user λ₯Ό ν΅ν΄ λ¨μΆν€ νμΈ λ° μμ κ°λ₯
6.2 μμ€ μΈμ¬μ΄νΈμ λμΌνκ² ctrl+λ§μ°μ€ click μΌλ‘ function μ μλΆλΆ μ΄λνκ² νλ €λ©΄
mouse binding > modifier : ["ctrl", "shift"] λ₯Ό modifier : ["ctrl"]λ‘ λ³κ²½
6.1 cscope μ€ν >> ctrl + \
- look up symbol : μ¬λ³Ό κ²μ
- search for text string : λ¬Έμμ΄ κ²μ
6.2 file open >> ctrl + r
6.3 κΈ°ν λ±λ± μ¬μ©λ²μ λ©λ΄μΌ μ°Έμ‘°