% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={vim-tips-and-tricks},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{vim-tips-and-tricks}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{vim-tips-and-tricks}{%
\section{vim-tips-and-tricks}\label{vim-tips-and-tricks}}

\hypertarget{vim-tips-and-tricks-1}{%
\section{Vim Tips and Tricks}\label{vim-tips-and-tricks-1}}

.. contents::

As I learn more about vim, I plan to document the tips and tricks I
learn here.

\hypertarget{how-to-set-tab-to-4-spaces-in-vim}{%
\subsection{how to set tab to 4 spaces in
vim}\label{how-to-set-tab-to-4-spaces-in-vim}}

Add the following into your .vimrc file:

.. code-block:: vim

\begin{verbatim}
set tabstop=4
set shiftwidth=4
set expandtab
\end{verbatim}

\hypertarget{how-to-set-replace-all-tabs-with-a-space}{%
\subsection{how to set replace all tabs with a
space}\label{how-to-set-replace-all-tabs-with-a-space}}

.. code-block:: vim

\begin{verbatim}
:%s/\t/ /g
\end{verbatim}

\hypertarget{how-to-highlight-spelling-errors}{%
\subsection{how to highlight spelling
errors}\label{how-to-highlight-spelling-errors}}

.. code-block:: vim

set spell spelllang=en\_us

\hypertarget{vimdiff-or-hg-merge}{%
\subsection{vimdiff or hg merge}\label{vimdiff-or-hg-merge}}

This is a list of some common commands when using vimdiff:

ctrl w (twice) switch windows

do diff obtain, take the other window's differences. Pull the change.

dp diff put, give the other window our differences. Push the change.

{[}c move focus to previous difference.

{]}c move focus to next difference.

:diffupdate diff update

:diffget get changes from specified window number and place them into
current window.

:diffput put changes from current window into specified window number.

zo open folded text

zc close folded text

\hypertarget{bgolemon-mar-27-2011-1005-am}{%
\subsection{bgolemon --- Mar 27, 2011 10:05
am}\label{bgolemon-mar-27-2011-1005-am}}

You should take a look at my vimrc
\texttt{here\ \textless{}http://bukzor.hopto.org/hgroot/home/file/c0078b4417f2/.vimrc\textgreater{}}\_.
It solves some common annoyances without changing the way vim works
much.

\end{document}
