Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apetenchea/vimscripts
Some vim scripts that make my life easier.
https://github.com/apetenchea/vimscripts
eclim vim vimrc vimscript
Last synced: about 21 hours ago
JSON representation
Some vim scripts that make my life easier.
- Host: GitHub
- URL: https://github.com/apetenchea/vimscripts
- Owner: apetenchea
- License: mit
- Created: 2016-10-16T13:59:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T11:52:48.000Z (5 months ago)
- Last Synced: 2024-06-22T04:40:44.020Z (5 months ago)
- Topics: eclim, vim, vimrc, vimscript
- Language: Vim Script
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VimScripts
Some vim scripts that make my life easier.
# Current setup
Quite minimalist, with only a few key mappings. See my current [vimrc](vimrc)Using the following plugins:
1. [pathogen](https://github.com/tpope/vim-pathogen)
2. [nerdtree](https://github.com/scrooloose/nerdtree)# Old setup
I'm keeping the old setup here for fun.
I used to have the following plugins installed:1. [pathogen](https://github.com/tpope/vim-pathogen)
2. [nerdtree](https://github.com/scrooloose/nerdtree)
3. [vim-localvimrc](https://github.com/embear/vim-localvimrc)
4. [syntastic](https://github.com/vim-syntastic/syntastic)
5. [YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
6. [rust.vim](https://github.com/rust-lang/rust.vim)
## [vimrc](vimrc_old)
My .vimrc file. Nowadays it's actually much more minimalist, but my nostalgia makes me keep this one up here.
## [ideavimrc](ideavimrc)
My .ideavimrc file. I use it together with [IdeaVim](https://github.com/JetBrains/ideavim) when coding in JetBrains IDEs.
## [eclim-extra](eclim-extra)
This script adds some features on top of the [Eclim](https://github.com/ervandew/eclim) plugin.
The lack of a command which could start Eclim from within Vim was annoying.
The `StartEclim` command in this script does exactly just that!
*How it works*
It first checks if the Eclim server is already running. If not, it starts it in background. When the Vim instance which started the server is closed, the server is also stopped automatically.
Also, this script adds some nice features that go along with Eclim, such as Javadoc comment folding and useful mappings.**Configuration**
Details about Eclim can be found [here](http://eclim.org/).
*Set `s:eclimd_path` to the path of your Eclim server*
The variable `s:eclimd_path` should contain the path to *eclimd*, which can be found in the folder where Eclim was installed.
*Using vim-localvimrc*
The best way to use eclim-extra is alongside [vim-localvimrc](https://github.com/embear/vim-localvimrc). This will enable you to automatically run the Eclim server in background, whenever Vim is started inside your Eclipse workspace. If not, you can manually start it by using the `StartEclim` command.
After you've installed vim-localvimrc, you should disable sandbox mode. Add this to your .vimrc:
```Vim script
" Disable sandbox mode for localvimrc.
g:localvimrc_sandbox = 0
```
In order to load .lvimrc files automatically, without asking, add this to your .vimrc:
```Vim script
" Don't ask before loading a .lvimrc file.
g:localvimrc_ask = 0
```
NOTE: if there are multiple users on the same machine, first make sure that it is safe to disable sanbox mode!
Then, simply put the contents of the eclim-extra script inside a file named *.lvimrc*, created in your eclipse workspace.
Now, the Eclim server will start automatically with Vim, inside the Eclipse workspace.
When you don't want the Eclim server to be started automatically, you can start Vim like this:
```Bash
vim --cmd 'let g:noeclim=1'
```**Usage**
To start the Eclim server from whithin Vim use:
```Vim script
:StartEclim
```**Mappings**
1. *CTRL+b* -> build project + toggle quickfix window.**Tips**
1. Regarding Eclim and [checkstyle](checkstyle.sourceforge.net), I ran into some problems, which I fixed by following [this](https://www.chromium.org/developers/checkstyle) advice.
2. How to check your default Eclipse workspace:
1. Go to $HOME/eclipse/configuration
2. In the *config.ini* file you should see a line:
```
osgi.instance.area.default=your_default_workspace
```**About the code**
The code aims to follow the [Google Vimscript Style Guide](https://google.github.io/styleguide/vimscriptguide.xml).