[Skip-CI] Provide a useful default .vimrc
Set system vim as editor for kubernetes, thus using the .vimrc.
This commit is contained in:
parent
805fe029dc
commit
542ad28ca1
2 changed files with 41 additions and 1 deletions
|
@ -2,9 +2,15 @@ package org.domaindrivenarchitecture.provs.server.infrastructure
|
|||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.ProvResult
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createFile
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.createFileFromResource
|
||||
|
||||
private const val resourcePath = "org/domaindrivenarchitecture/provs/desktop/infrastructure"
|
||||
|
||||
fun Prov.provisionServerCliConvenience() = task {
|
||||
provisionKubectlCompletionAndAlias()
|
||||
provisionVimrc()
|
||||
provisionKubeEditor()
|
||||
}
|
||||
|
||||
fun Prov.provisionKubectlCompletionAndAlias(): ProvResult = task {
|
||||
|
@ -12,3 +18,12 @@ fun Prov.provisionKubectlCompletionAndAlias(): ProvResult = task {
|
|||
cmd("echo 'alias k=kubectl' >> ~/.bashrc")
|
||||
cmd("echo 'complete -o default -F __start_kubectl k' >>~/.bashrc")
|
||||
}
|
||||
|
||||
fun Prov.provisionVimrc(): ProvResult = task {
|
||||
createFileFromResource("~/.vimrc",".vimrc", resourcePath)
|
||||
}
|
||||
|
||||
fun Prov.provisionKubeEditor(): ProvResult = task {
|
||||
cmd("echo '' >> ~/.profile")
|
||||
cmd("echo 'export KUBE_EDITOR=vim' >> ~/.profile")
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
filetype plugin indent on
|
||||
syntax on
|
||||
|
||||
" set permanent line numbering
|
||||
set number relativenumber
|
||||
|
||||
" we want to know exact position
|
||||
set ruler
|
||||
|
||||
" control tabwidth to be 2 tabs wide
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
|
||||
" keep indentation level
|
||||
set autoindent
|
||||
|
||||
" map two semicolons to escape key
|
||||
:inoremap ;; <Esc>
|
||||
|
||||
" let new window splits happen below
|
||||
set splitbelow
|
||||
|
||||
" command for terminal creation below all splits
|
||||
:command Bterm botright terminal
|
Loading…
Reference in a new issue