-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
executable file
·137 lines (118 loc) · 7.02 KB
/
readme.txt
File metadata and controls
executable file
·137 lines (118 loc) · 7.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Mac and linux
# Before proceeding first follow tbash repo steps which contains automated scripts to futher steps.
# Install curl , git, ctags, cscope, vim or (macvim https://github.com/macvim-dev/macvim on mac). If not present.
# Install spf-13
curl http://j.mp/spf13-vim3 -L -o - | sh
------- Steps after this can be automated by vim_setup.sh in tbash repo.
# Clone git vim repo in Home dir.
cd ~
git clone https://github.com/tejv/vim.git
# Symlink 3 files in cloned vim repo (either lean or vim ) .vimrc.local, .vimrc.bundles.local, .vimrc.before.local
in home dir
E.g
If these files already in home directory delete them
cd ~
ln -s ~/vim/lean/.vimrc.local ~/.vimrc.local
ln -s ~/vim/lean/.vimrc.before.local .vimrc.before.local
ln -s ~/vim/lean/.vimrc.bundles.local .vimrc.bundles.local
Next time just update from git repo to sync on all machines. (cmd + shift + . display hidden files in mac)
# Some more info for mac
# If it says not from App Store. Go to system preferences -> security-> enable mccvim
# Open macvim it will be set to spf13. Any changes need to be done only in git vim directory.
# To open macVim from terminal run this command. Now use gvim to open in terminal.
alias gvim='/Applications/MacVim.app/Contents/MacOS/Vim -g'
or use "vim" to open in terminal.
After all steps open vim and type below command to update plugins based on before.local
:BundleInstall!
Windows - follow same as mac/linux
1. This folder has custom vimrc commands which will override or add to spf 13.
2. This folder also has template for various file types.
3. This folder is the one which is needed if vim need to be installed on different pc.
4. By default HOME dir is C:\users\username\
Any overwritten vimrc should be kept in this folder.
5. But spf 13 keep all its file in HOME\.spf-13 folder. So how it works. By default vim base installation(C:\program files\vim\) looks for any over ride files in HOME dir
HOME dir.
6. This is achieved by spf 13 using symbolic links. It creates symbolic links of all relavant files in HOME folder to those in spf 13 folder.
******Steps to install vim and spf 13 on new windows pc.
1. Install vim latest version with lua support. One which has in built lua. Lua support is needed if neocomplete plugin need to run. To enable lua support in normal vim
just copy gvim.exe(with lua), lua.dll and lua folder in original gvim.exe folder. http://www.vim.org/download.php
2. Install Git.
2. Install spf 13 with steps from webpage(http://vim.spf13.com/) using this option "Installing spf13-vim on Windows
The easiest way is to download and run the spf13-vim-windows-install.cmd file."
3. Copy vim folder(from github repo) in HOME\.spf 13 folder.
4. Now create symlinks by opening command prompt in adminitrative mode. Run below commands. Note change path as per your username. In this case it is teju.
mklink "C:\Users\teju\.vimrc.before.local" "C:\Users\teju\.spf13-vim-3\vim\.vimrc.before.local"
mklink "C:\Users\teju\.vimrc.bundles.local" "C:\Users\teju\.spf13-vim-3\vim\.vimrc.bundles.local"
mklink "C:\Users\teju\.vimrc.local" "C:\Users\teju\.spf13-vim-3\vim\.vimrc.local"
5. vimrc.before.local runs before spf 13. So it can enable disable stuff(plugin) so that spf 13 found a variable already defined. So it won't use default settings.
6. vimrc.local runs after spf 13 and override spf settings. So we will store our additional commands here.
7. Add new plugins in vimrc.bundles.local file
e.g
Bundle \'spf13/vim-colors\'
If a bundle is not needed (completely uninstall) put a comment (") before the line.
After this run
vim +BundleInstall! +BundleClean +q
This will add any new plugin and remove commented out plugins.
8. To disable a plugin (not uninstall)
In vimrc.local file put UnBundle command
e.g
UnBundle \'AutoClose\'
Then run below from gvim.
:BundleClean!
or this from command prompt
gvim BundleClean!
*****Use command prompt to open multiple files silently in vim
Go to the folder where files are in command prompt
cd xxxxxx
then
gvim --remote-silent *.c *.h
******Run Ctags on a folders
Go to the folder where files are in command prompt
cd xxxxxx
then
ctags -R *.*
******Install YouCompleteMe on Windows with clang Working but don't enable clang i.e do not provide ycm_extra_conf file
Follow
https://github.com/Valloric/YouCompleteMe/wiki/Windows-Installation-Guide
Instructions for 64-bit using MinGW64 (clang)
1. Every component used in this tutorial must have same bit architecture. It must be 64 bit.
2. Vim should be 64 bit latest version. https://bintray.com/veegee/generic/vim_x64
3. Install python 2.7 64 bit. Add python.exe path to PATH environement variable.
4. Download libpython‑2.7.10‑cp27‑none‑win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#libpython
5. Add scripts folder of python install in PATH so that pip exe can run
6. in command prompt go to folder where.whl file was downloaded.
7. Run
pip install xxx.whl
This will install libpython27.a
8. Clear previous youcomplete and install new one using
vim +BundleInstall! +BundleClean +q
and disabling youcomplete in vim.before.local
enable again and then run
vim +BundleInstall! +BundleClean +q
again.
9.Install MinGW-w64 http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-posix/sjlj/
10. Add path of bin to PATH environment variable
11. Download latest clang for 64 bit windows http://llvm.org/releases/download.html#3.3 pre built binaries clang for win 64bit.
12a. Create a folder ycomp_build in HOME.
12b. Install clang in ycomp_build\LLVM folder.(means LLVM folder will have bin , include etc directories) Add clang bin path to PATH environment variable. This step is critical
LLVM clang should be installed in build folder.
13. Remember path where LLVM clang installed %USERPROFILE%\LLVM . Same will be used later in building
14. Install cmake windows from http://www.cmake.org/download/ and add bin path to PATH environment variable.
15. Replace (userprofile here is HOME)
%USERPROFILE%\.vim\bundle\YouCompleteMe\third_party\ycmd\cpp\BoostParts\boost\detail\interlocked.hpp with that file.https://github.com/Reikion/YouCompleteMe/blob/master/cpp/BoostParts/boost/detail/interlocked.hpp
16. Edit %USERPROFILE%\.vim\bundle\YouCompleteMe\third_party\ycmd\cpp\CMakeLists.txt and add the following lines:
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -include cmath")
add_definitions(-DBOOST_PYTHON_SOURCE)
add_definitions(-DBOOST_THREAD_BUILD_DLL)
add_definitions(-DMS_WIN64)
17. Using command prompt go to ycomp_build dir and run
cmake -G "MinGW Makefiles" -DPATH_TO_LLVM_ROOT=%USERPROFILE%\ycomp_build\LLVM . %USERPROFILE%\.vim\bundle\YouCompleteMe\third_party\ycmd\cpp
18 Run
mingw32-make ycm_support_libs
19. (Obsolete Do not do this) Copy ycm_core.pyd, ycm_client_support.pyd, and libclang.dll from
%USERPROFILE%\.vim\bundle\YouCompleteMe\third_party\ycmd to
%USERPROFILE%\.vim\bundle\YouCompleteMe\python
Over
*****Use youcompleteme for c ,c ++ files
https://wiki.archlinux.org/index.php/YouCompleteMe
http://wiki.yangleo.me/2013/08/15/Let-YCM-Support-C-files.html