added gitignore, got shell script working
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*swp
|
||||||
8
src/vimrc
Normal file
8
src/vimrc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set autoindent expandtab tabstop=4 shiftwidth=4
|
||||||
|
set hidden
|
||||||
|
nnoremap <C-S> :w<cr>
|
||||||
|
inoremap <C-S> <esc>:w<cr>i
|
||||||
|
let mapleader=" "
|
||||||
|
nnoremap <leader>w :w<cr>:bw<cr>
|
||||||
|
nnoremap <leader>v :e ~/.vimrc<cr>
|
||||||
|
nnoremap <leader>s :source ~/.vimrc<cr>
|
||||||
21
vk
Executable file
21
vk
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
STTY_PRESENT=$(grep "stty -ixon" ~/.bashrc)
|
||||||
|
BIND_PRESENT=$(grep "bind -r '\\\C-s'" ~/.bashrc)
|
||||||
|
|
||||||
|
if [ -z "$STTY_PRESENT" ]; then
|
||||||
|
echo "writing 'stty -ixon' to .bashrc..."
|
||||||
|
echo "stty -ixon" >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
if [ -z "$BIND_PRESENT" ]; then
|
||||||
|
echo "writing 'bind -r '\C-s'' to .bashrc..."
|
||||||
|
echo "bind -r '\C-s'" >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
VIMRC_FILE=~/.vimrc
|
||||||
|
if test -f "$VIMRC_FILE"; then
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
cp src/vimrc ~/.vimrc
|
||||||
|
echo "copied src/vimrc to .vimrc"
|
||||||
|
fi
|
||||||
|
|
||||||
Reference in New Issue
Block a user