From 8b1cb8c19966369336faa19d46b81517cc20eff4 Mon Sep 17 00:00:00 2001 From: breadcat Date: Thu, 28 Jan 2021 13:41:02 +0000 Subject: Vim cheatsheet update --- content/posts/personal-vim-cheatsheet.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'content/posts/personal-vim-cheatsheet.md') diff --git a/content/posts/personal-vim-cheatsheet.md b/content/posts/personal-vim-cheatsheet.md index 42e1cc9..f4fcfaf 100644 --- a/content/posts/personal-vim-cheatsheet.md +++ b/content/posts/personal-vim-cheatsheet.md @@ -119,4 +119,10 @@ Add the below to your `init.vim` file (if using neovim): autocmd BufWritepre * %s/\n\+\%$//e ``` +Another point worth adding is sometimes files formatted outside vim will contain '^@' symbols scattered between letters. These represent null characters and can be removed by running: +``` +%s/[\x0]//g +``` + * **Edit 2020-12-02:** Added notes regarding reading file contents and command output. +* **Edit 2021-01-02:** Added null character removal note. -- cgit v1.2.3