The goal is to have a stable, clean, intuitive configuration of vim. To do that, we try to have the same key binding in each languages for similar features.
You can check all keybindings with SUCH-Help <leader>H
or <leader><leader>
for current buffer keybinding.
Feature | Keybinding |
---|---|
Build | <leader>b |
Run | <leader>R |
Completions | auto |
Rename | <leader>r |
Go to definition | <leader>g |
Show documentation | <leader>d |
Auto formatting | on write |
We also developed a dependencies control so the user don't have to install manually the npm
, pip
and cargo
packages required by our plugins' selection.
Those dependencies are installed automatically in .vim/SUCH-Vim/dependencies/
You can develop in your cloned Git repository's directory and execute the ./install.sh in order to apply changes to your config. A backup of your last config will be created in the $HOME/.vimrc_old file.
Feature | Status |
---|---|
Folding | ✔ |
Preview | ✔ |
Auto formatting | ❌ |
Syntax checking | ❌ |
We use yapf
to check the syntax of your python project. It is automatically
installed for you but you still have to provide your own ~/.style.yapf
file to configure it.
Feature | Status |
---|---|
Completions | ✔ |
Rename | ✔ |
Go to definition | ✔ |
Show documentation | ✔ |
Auto formatting | ✔ |
Syntax checking | ✔ |
We use eslint
to check the syntax of your javascript project. It is automatically
installed for you but you still have to provide your own .eslintrc.json
file to configure it.
Feature | Status |
---|---|
Completions | ✔ |
Rename | ✔ |
Go to definition | ✔ |
Show documentation | ✔ |
Auto formatting | ✔ |
Syntax checking | ✔ |
Language | Feature | Status |
---|---|---|
Html | Auto formatting | ✔ |
css | Auto formatting | ✔ |
json | Auto formatting | ✔ |
In order to have all the features, you have to install gocode, godef, goimports, etc.
The simplest way to do that is within vim with :GoInstallBinaries
.
Feature | Status |
---|---|
Completions | ✔ |
Rename | ✔ |
Go to definition | ✔ |
Show documentation | ✔ |
Auto formatting | ✔ |
Syntax checking | ✔ |
In order to have formatting features, you have to install astyle
and clang-check
.
You can find them in your distribution packet manager.
Clang-Check uses Compilation database (https://clang.llvm.org/docs/JSONCompilationDatabase.html) in order to figure out specific build options for each file. You can generate those using CMake or Build EAR (bear) (for non-CMake project) that can be find in your distribution packet manager.
Feature | Status |
---|---|
Completions | ✔ |
Rename | ❌ |
Go to definition | ❌ |
Show documentation | ❌ |
Auto formatting | ✔ |
Syntax checking | ✔ |
Feature | Status |
---|---|
Completions | ✔ |
Rename | ❌ |
Go to definition | ❌ |
Show documentation | ❌ |
Auto formatting | ❌ |
Syntax checking | ✔ |
Build | ✔ |
Run | ✔ |
You can format a paragraph by selecting it and use the <leader>f
.
Ex: Put your cursor at the begining of the paragraph and do *line number of paragraph*<leader>f
We use rustfmt
to format your project and cargo
itself to check the syntax. rustfmt
is automatically
installed for you but you still have to provide your own rustfmt.toml
file at the root of your project to configure it.
Feature | Status |
---|---|
Build | ❌ |
Run | ✔ |
Completions | ✔ |
Rename | ❌ |
Go to definition | ❌ |
Show documentation | ❌ |
Auto formatting | ✔ |
Move to the right window:
<Leader>wl
<Leader>w<Right>
Move to the left window:
<Leader>wh
<Leader>w<Left>
Move to the below window:
<Leader>wj
<Leader>w<Down>
Move to the above window:
<Leader>wk
<Leader>w<Up>
Toggle nerdtree : <Leader>tt
Fuzzy search files : <Leader>ff
View opened buffers and open one of them : <Leader>bb(wait and type a single number)<Enter>
Go to buffer with number : <Leader>bg(enter a number)<Enter>
Delete buffer with number : <Leader>bd(enter a number)d
Create buffer : <Leader>be (write the file name)<Enter>
Next buffer : <Leader>bn
Previous buffer : <Leader>bp
Jump to anywhere you want with minimal keystrokes, with just one key binding.
Search for a character with : <Leader>;{char}{label}
.
Search for n characters with : <Leader>ss{char}{char}...{char}<Enter>
.
You can also jump to a line with jk : <Leader>j{char}
and <Leader>k{char}
.
You can define your own configuration in the file ~/.suchvimrc.
Here's an example:
" Remap leader
let mapleader = " "
" Define colorscheme and airline theme
autocmd VimEnter * colorscheme solarized
\| :AirlineTheme solarized
" Add your own set of plugins
call SUCHVim_addPlugins(['altercation/vim-colors-solarized', 'othree/yajs.vim', 'nvie/vim-flake8'])`
" Add your plugins dependencies here if you want them to be installed automatically
autocmd FileType javascript call SUCHVim_check_npm_dependencies(['yajs'])
autocmd FileType python call SUCHVim_check_pip_executable_dependencies(['flake8'])