Install the plugins by running the following commands in the root of the repository :
git sudmodule init
git submodule update
- within vim
:PluginInstall
exuberant-ctags
: For tag-view with IDE.pip install flake8
: for python code check.pip install jupytext
: for jupyter notebook editing in vim
-
View file structure : Uses NerdTree. Enable/Disable tree :
<C-t>
-
File search :
<Ctrl>p
-
To enable code completion/ import completion you need to set up a project. To set up a project in the project folders (can be the top level) in a vim session type
:RopeOpenProject
. It will create theconfig.py
where you can add options such as files to ignore, warnings to ignore, etc. -
To enable debugging you need to install ipdb
pip install ipdb
List of some commands according to the .vimrc
present
-
Code Completion:
<Ctrl><space>
or<TAB>
(via SuperTab)- 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 theos
module)
- Completion
-
Folding code:
- Only one block:
,f
- All the blocks:
,F
- Only one block:
-
Goto definition :
,g
-
Breakpoint :
- Insert breakpoint :
,b
- step into :
s
- next line :
n
- next breakpoint :
c
- step up :
up
- help :
?
- Insert breakpoint :
Prefix key is C-q
c # create a new window
, # name the window (test, vim, console, log, etc.)
" # split pane horizontally
% # split pane vertically
j (or k) # move up or down a pane
h (or l) # move left or right a pane
x # kill a pane or window
# move to window
n (or p) # move to next (or previous) window
l # move to previously selected window
f # find window by name
Alt+ # Resize Windows left/right/etc.
attach (or a) # attaches a session
detach (or d) # detaches a session
kill-session -t <session id>
rename-session -t <old> <new>
`` = ;
Specify master file for each subfile : use modeline
``% mainfile: "MASTER_FILE"``
By default uses pdflatex. To use latex/rubber set g:tex_flavor = "latex"/"rubber"
- Insert mode:
<LocalLeader><LocalLeader> <LocalLeader>
<LocalLeader>K Dictionary completion
<LocalLeader>M Maths completion
<LocalLeader>C Insert a citation
<LocalLeader>B Insert an environment
<LocalLeader>R Insert a reference
- Normal Mode:
<F1> Insert a template file
<C-F> Jump to next \\(begin|end)
<C-B> Jump to previous \\(begin|end)
gd Goto label's declaration
gb Goto citekey's declaration
<LocalLeader>k Small compile
<LocalLeader>K Big compile
<LocalLeader>V View the document
<C-LeftMouse> SyncTeX: Forward search
<LocalLeader>Q View the quickfix window
<LocalLeader>U Update the BibTeX database(s)
- copy
.inputrc
to$HOME
for reverse search using up/down - copy
rsync.excludes
to$HOME/.config
for easy access to simple file filtering to be used withrsync