1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:20:06 +08:00
SpaceVim/docs/_posts/2018-09-28-use-vim-as-ide.md

119 lines
3.8 KiB
Markdown
Raw Normal View History

2018-10-02 21:04:30 +08:00
---
title: "Use Vim as IDE"
categories: [blog]
2020-05-10 14:05:04 +08:00
description: "A general guide for using SpaceVim as general IDE"
2020-05-17 14:08:03 +08:00
type: article
2018-10-02 21:04:30 +08:00
comments: true
commentsID: "Use Vim as IDE"
---
# [Blogs](../blog/) >> Use Vim as IDE
This is a general guide for using SpaceVim as IDE. including following sections:
<!-- vim-markdown-toc GFM -->
2019-10-15 18:41:43 +08:00
- [Installation](#installation)
- [Key binding guide](#key-binding-guide)
2018-10-02 21:04:30 +08:00
- [Default UI](#default-ui)
- [project manager](#project-manager)
2018-10-02 21:04:30 +08:00
- [Fuzzy finder](#fuzzy-finder)
2020-12-22 21:32:30 +08:00
- [Git integration](#git-integration)
2018-10-02 21:04:30 +08:00
- [Files and Windows](#files-and-windows)
2020-12-22 21:32:30 +08:00
- [Search and replace](#search-and-replace)
2019-01-30 22:20:22 +08:00
- [Language support](#language-support)
2018-10-02 21:04:30 +08:00
<!-- vim-markdown-toc -->
### Installation
SpaceVim is a Vim configuration, so you need to install vim or neovim,
to enable `+python3` and `+python` support for neovim, you need to install `pynvim`:
2018-10-02 21:04:30 +08:00
```
pip install --user pynvim
pip3 install --user pynvim
```
2020-08-11 22:25:17 +08:00
following the [quick start guide](../quick-start-guide/) to install SpaceVim,
### Key binding guide
All of the key bindings have been included in mapping guide. If you forgot the next key,
a mapping guide will be displayed, all the keys and description are shown in the mapping guide window.
2018-10-02 21:04:30 +08:00
2023-07-05 11:50:23 +08:00
![float_guide](https://img.spacevim.org/89091735-5de96a00-d3de-11ea-85e1-b0fc64537836.gif)
for more info, please checkout the article about mapping guide: [Mnemonic key bindings navigation](../mnemonic-key-bindings-navigation/)
2018-10-02 21:04:30 +08:00
### Default UI
2023-07-05 11:50:23 +08:00
![default UI](https://img.spacevim.org/33804722-bc241f50-dd70-11e7-8dd8-b45827c0019c.png)
2018-10-02 21:04:30 +08:00
The welcome screen will show the recent files of current project.
The tabline displays all opened buffers or tabs. The filetree is opened on the left,
2023-07-05 11:50:23 +08:00
and the key binding of filetree is `<F3>`. Tagbar's key binding is `<F2>`, it will show all tags in current file.
### project manager
SpaceVim detect the project root based on the `project_rooter_patterns` option.
This is a list of patterns of filename or directory.
the default value is `['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']`.
2020-08-11 22:25:17 +08:00
read the [documentation](../documentation/#managing-projects) for more info.
2019-01-30 22:20:22 +08:00
2020-10-07 22:34:35 +08:00
SpaceVim will change switch to project root automatically based on `project_rooter_patterns` option.
By default it will find outermost directory by default, to find nearest directory,
you need to change `project_rooter_outermost` to `false`.
```toml
[options]
project_rooter_outermost = false
```
If you want to list all recent opened project, you need to load a fuzzy finder layer.
for example `telescope` layer, the the key binding `SPC p p` is available for you.
2023-07-05 11:50:23 +08:00
![image](https://img.spacevim.org/169195419-329a1b58-850d-40a8-ba02-d0e1f9367305.png)
2018-10-02 21:04:30 +08:00
### Fuzzy finder
SpaceVim provides 5 fuzzy finder layer, they are unite, denite, fzf, leaderf and ctrlp.
To use fuzzy finder feature, you need to enable a
2018-10-02 21:04:30 +08:00
fuzzy finder layer. for example enable denite layer:
```toml
[[layers]]
name = "denite"
2018-10-02 21:04:30 +08:00
```
2020-12-22 21:32:30 +08:00
### Git integration
The `git` layer and `VersionControl` layer provide Version control integration for SpaceVim.
These layers are not loaded by default. To use these features, you need to enable these layers
in your configuration file.
```toml
[[layers]]
name = 'git'
[[layers]]
name = 'VersionControl'
```
2018-10-02 21:04:30 +08:00
### Files and Windows
The windows ID will be shown on the statusline, and users can use `SPC + number` to jump to specific windows,
the buffer index or tabpage index will be shown on the tabline.
To jump to specific tab, you can use `Leader + number` the default leader in SpaceVim is `\`.
2018-10-02 21:04:30 +08:00
2020-12-22 21:32:30 +08:00
### Search and replace
With the flygrep, you can search text in whole project on the fly. When the results are displayed
on flygrep windows, you can also use `Alt-r` to start iedit mode based on the input of flygrep
promote.
2019-01-30 22:20:22 +08:00
### Language support
2020-03-15 10:14:57 +08:00
By default, SpaceVim does not load any language layer, please checkout the [available layers](../layers/) page.