aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-11-07 20:25:34 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-11-07 20:38:04 +0100
commit3a7feb69897ad081cbe4a782b08176084df6e386 (patch)
treea368b1f5c8531a5f975d36b8ab962cec3a240df9
parent10e5040b61ece408db268e830953047001951a15 (diff)
downloadrneovim-3a7feb69897ad081cbe4a782b08176084df6e386.tar.gz
rneovim-3a7feb69897ad081cbe4a782b08176084df6e386.tar.bz2
rneovim-3a7feb69897ad081cbe4a782b08176084df6e386.zip
vim-patch.sh: remove vimrc_example.vim
vimrc_example.vim is not relevant to Nvim. Anything worth having in there should be made an actual default. .gitignore: - remove *.orig ... super annoying
-rw-r--r--.gitignore1
-rw-r--r--runtime/vimrc_example.vim56
-rwxr-xr-xscripts/vim-patch.sh4
3 files changed, 4 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore
index 61b96c158f..ddbcc9c60d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,6 @@
/.deps/
/tmp/
-*.orig
*.mo
.*.sw?
*~
diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim
deleted file mode 100644
index 17cba123a8..0000000000
--- a/runtime/vimrc_example.vim
+++ /dev/null
@@ -1,56 +0,0 @@
-" An example for a vimrc file.
-"
-" To use it, copy it to
-" for Unix: $HOME/.config/nvim/init.vim
-" for Windows: %LOCALAPPDATA%\nvim\init.vim
-
-set backup " keep a backup file (restore to previous version)
-set undofile " keep an undo file (undo changes after closing)
-set ruler " show the cursor position all the time
-set showcmd " display incomplete commands
-
-" Don't use Ex mode, use Q for formatting
-noremap Q gq
-
-" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
-" so that you can undo CTRL-U after inserting a line break.
-inoremap <C-U> <C-G>u<C-U>
-
-" Switch syntax highlighting on
-syntax on
-
-" Also switch on highlighting the last used search pattern.
-set hlsearch
-
-" I like highlighting strings inside C comments.
-let c_comment_strings=1
-
-" Enable file type detection.
-" Use the default filetype settings, so that mail gets 'textwidth' set to 72,
-" 'cindent' is on in C files, etc.
-" Also load indent files, to automatically do language-dependent indenting.
-filetype plugin indent on
-
-" Put these in an autocmd group, so that we can delete them easily.
-augroup vimrcEx
- autocmd!
-
- " For all text files set 'textwidth' to 78 characters.
- autocmd FileType text setlocal textwidth=78
-
- " When editing a file, always jump to the last known cursor position.
- " Don't do it when the position is invalid or when inside an event handler
- autocmd BufReadPost *
- \ if line("'\"") >= 1 && line("'\"") <= line("$") |
- \ execute "normal! g`\"" |
- \ endif
-
-augroup END
-
-" Convenient command to see the difference between the current buffer and the
-" file it was loaded from, thus the changes you made.
-" Only define it when not defined already.
-if !exists(":DiffOrig")
- command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_ | diffthis
- \ | wincmd p | diffthis
-endif
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index fd1d2a200b..07b3904570 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -151,6 +151,10 @@ preprocess_patch() {
local na_po='sjiscorr.c\|ja.sjis.po\|ko.po\|pl.cp1250.po\|pl.po\|ru.cp1251.po\|uk.cp1251.po\|zh_CN.cp936.po\|zh_CN.po\|zh_TW.po'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"
+ # Remove vimrc_example.vim
+ local na_vimrcexample='vimrc_example\.vim'
+ 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/\<\%('${na_vimrcexample}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"
+
# Rename src/ paths to src/nvim/
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \
"$file" > "$file".tmp && mv "$file".tmp "$file"