vimrc revision 10952
112027Sjungma@eit.uni-kl.de" Copyright (c) 2015 Advanced Micro Devices, Inc.
212027Sjungma@eit.uni-kl.de" All rights reserved.
312027Sjungma@eit.uni-kl.de"
412027Sjungma@eit.uni-kl.de" The license below extends only to copyright in the software and shall
512027Sjungma@eit.uni-kl.de" not be construed as granting a license to any other intellectual
612027Sjungma@eit.uni-kl.de" property including but not limited to intellectual property relating
712027Sjungma@eit.uni-kl.de" to a hardware implementation of the functionality of the software
812027Sjungma@eit.uni-kl.de" licensed hereunder.  You may use the software subject to the license
912027Sjungma@eit.uni-kl.de" terms below provided that you ensure that this notice is replicated
1012027Sjungma@eit.uni-kl.de" unmodified and in its entirety in all distributions of the software,
1112027Sjungma@eit.uni-kl.de" modified or unmodified, in source code or in binary form.
1212027Sjungma@eit.uni-kl.de"
1312027Sjungma@eit.uni-kl.de" Redistribution and use in source and binary forms, with or without
1412027Sjungma@eit.uni-kl.de" modification, are permitted provided that the following conditions are
1512027Sjungma@eit.uni-kl.de" met: redistributions of source code must retain the above copyright
1612027Sjungma@eit.uni-kl.de" notice, this list of conditions and the following disclaimer;
1712027Sjungma@eit.uni-kl.de" redistributions in binary form must reproduce the above copyright
1812027Sjungma@eit.uni-kl.de" notice, this list of conditions and the following disclaimer in the
1912027Sjungma@eit.uni-kl.de" documentation and/or other materials provided with the distribution;
2012027Sjungma@eit.uni-kl.de" neither the name of the copyright holders nor the names of its
2112027Sjungma@eit.uni-kl.de" contributors may be used to endorse or promote products derived from
2212027Sjungma@eit.uni-kl.de" this software without specific prior written permission.
2312027Sjungma@eit.uni-kl.de"
2412027Sjungma@eit.uni-kl.de" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2512027Sjungma@eit.uni-kl.de" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2612027Sjungma@eit.uni-kl.de" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2712027Sjungma@eit.uni-kl.de" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2812027Sjungma@eit.uni-kl.de" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2912027Sjungma@eit.uni-kl.de" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3012027Sjungma@eit.uni-kl.de" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3112027Sjungma@eit.uni-kl.de" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3212027Sjungma@eit.uni-kl.de" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3312027Sjungma@eit.uni-kl.de" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3412027Sjungma@eit.uni-kl.de" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3512027Sjungma@eit.uni-kl.de"
3612027Sjungma@eit.uni-kl.de" Authors: Anthony Gutierrez
3712027Sjungma@eit.uni-kl.de
3812027Sjungma@eit.uni-kl.de
3912027Sjungma@eit.uni-kl.de" this vimrc file helps users follow the gem5 style guide see:
4012027Sjungma@eit.uni-kl.de" www.gem5.org/Coding_Style
4112027Sjungma@eit.uni-kl.de" it highlights extraneaous whitespace and tabs (so you can easily remove
4212027Sjungma@eit.uni-kl.de" them), sets column length to a max of 78 characters, expands tabs, and sets
4312027Sjungma@eit.uni-kl.de" a tab width of 4 spaces.
4412027Sjungma@eit.uni-kl.de
4512027Sjungma@eit.uni-kl.de" *NOTE 1* this doesn't guarantee that your code with fit the style guidelines,
4612027Sjungma@eit.uni-kl.de" so you should still to double check everything, but it helps with a lot of
4712027Sjungma@eit.uni-kl.de" tedious stuff.
4812027Sjungma@eit.uni-kl.de
4912027Sjungma@eit.uni-kl.de" *NOTE 2* if you do actually NEED to use a tab, e.g., in a Makefile, enter
5012027Sjungma@eit.uni-kl.de" insert mode and type ctrl-v first, which will make tabs behave as expected
5112027Sjungma@eit.uni-kl.de
5212027Sjungma@eit.uni-kl.defiletype indent on "auto indenting
5312027Sjungma@eit.uni-kl.deset tabstop=4 "tabs = 4 spaces
5412027Sjungma@eit.uni-kl.deset shiftwidth=4 "auto indent = 4 spaces
5512027Sjungma@eit.uni-kl.deset expandtab "expand tabs to spaces
5612027Sjungma@eit.uni-kl.deset tw=78 "max cols is 78
5712027Sjungma@eit.uni-kl.de
5812027Sjungma@eit.uni-kl.de" highlight extrawhite space with light blue background
5912027Sjungma@eit.uni-kl.dehighlight ExtraWhitespace ctermbg=lightblue guibg=lightblue
6012027Sjungma@eit.uni-kl.dematch ExtraWhitespace /\s\+$\|\t/
6112027Sjungma@eit.uni-kl.de
6212027Sjungma@eit.uni-kl.de" stuff to prevent the light blue highlighting from showing up at the end of
6312027Sjungma@eit.uni-kl.de" lines when you're in insert mode. i.e., everytime you enter a space as you're
6412027Sjungma@eit.uni-kl.de" entering text the highlighting will kick in, which can be annoying. this will
6512027Sjungma@eit.uni-kl.de" make the highlighting only show up if you finish editing and leave some extra
6612027Sjungma@eit.uni-kl.de" whitespace
6712027Sjungma@eit.uni-kl.deautocmd BufWinEnter * match ExtraWhitespace /\s\+$\|\t/
6812027Sjungma@eit.uni-kl.deautocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$\|\t\%#\@<!/
6912027Sjungma@eit.uni-kl.deautocmd InsertLeave * match ExtraWhitespace /\s\+$\|\t/
7012027Sjungma@eit.uni-kl.deautocmd BufWinLeave * call clearmatches()
7112027Sjungma@eit.uni-kl.de
7212027Sjungma@eit.uni-kl.de
7312027Sjungma@eit.uni-kl.de" optionally set a vertical line on column 79. anything on, or after the line
7412027Sjungma@eit.uni-kl.de" is over the limit. this can be useful as set tw=78 won't breakup existing
7512027Sjungma@eit.uni-kl.de" lines that are over the limit, and the user can also do certain things to
7612027Sjungma@eit.uni-kl.de" make lines go past the set textwidth, e.g., joining a line (shift-j or J)
7712027Sjungma@eit.uni-kl.de
7812027Sjungma@eit.uni-kl.de"if exists('+colorcolumn')
7912027Sjungma@eit.uni-kl.de"    set colorcolumn=79
8012027Sjungma@eit.uni-kl.de"endif
8112027Sjungma@eit.uni-kl.de
8212027Sjungma@eit.uni-kl.de
8312027Sjungma@eit.uni-kl.de" optionally set spell checking
8412027Sjungma@eit.uni-kl.de"set spell
8512027Sjungma@eit.uni-kl.de
8612027Sjungma@eit.uni-kl.de" optionally highlight whitespace with specified characters. tab for trailing
8712027Sjungma@eit.uni-kl.de" tabs, trail for trailing whitespace, extends for lines that extend beyond
8812027Sjungma@eit.uni-kl.de" screen when wrap is off, and non-breakable white spaces. list must be set
8912027Sjungma@eit.uni-kl.de" for these characters to display.
9012027Sjungma@eit.uni-kl.de"set list
9112027Sjungma@eit.uni-kl.de"set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
9212027Sjungma@eit.uni-kl.de