Merge branch 'master' of ssh://git.rayelliott.dev:3222/dots/nvim
This commit is contained in:
commit
b2850f957d
|
@ -8,12 +8,8 @@ if ($1) {
|
|||
}
|
||||
endsnippet
|
||||
|
||||
snippet cl; "console.log( ... );"
|
||||
console.log($0);
|
||||
endsnippet
|
||||
|
||||
snippet cl "console.log( ... )"
|
||||
console.log($0)
|
||||
console.log($0);
|
||||
endsnippet
|
||||
|
||||
snippet if "if ( ... ) { ... }"
|
||||
|
@ -42,36 +38,74 @@ setTimeout(() => {$0
|
|||
endsnippet
|
||||
|
||||
snippet jsx "import React ..."
|
||||
import React from "react"
|
||||
import React from "react";
|
||||
|
||||
export default () => (
|
||||
<${1:div}>$0</$1>
|
||||
)
|
||||
endsnippet
|
||||
|
||||
snippet jsxs "import React ... (styled)"
|
||||
import React from "react"
|
||||
import styled from "styled-components"
|
||||
|
||||
const $1 = styled.${2:div}\`
|
||||
$3
|
||||
\`
|
||||
|
||||
export default () => (
|
||||
<$1>$0</$1>
|
||||
)
|
||||
endsnippet
|
||||
|
||||
snippet xc "class ..."
|
||||
class $1 extends React.component {
|
||||
class $1 extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.setState({$0})
|
||||
super(props);
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
)
|
||||
<${2:div} className={this.props.className}>
|
||||
$0
|
||||
</$2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default () => (
|
||||
<S.$1}></S.$1>
|
||||
);
|
||||
endsnippet
|
||||
|
||||
snippet jsxs "import React ... styled"
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const S = {};
|
||||
|
||||
class $1 extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<${2:div} className={this.props.className}>
|
||||
$0
|
||||
</$2>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
S.$1 = styled($1)\`
|
||||
\`;
|
||||
|
||||
export default () => (
|
||||
<S.$1}></S.$1>
|
||||
);
|
||||
endsnippet
|
||||
|
||||
snippet jsc "class ... extends React.Component"
|
||||
class $1 extends React.Component \{
|
||||
${2: constructor(props) \{
|
||||
super(props);
|
||||
this.state = \{
|
||||
\}
|
||||
\}}
|
||||
|
||||
render() \{
|
||||
return (
|
||||
<${3:div}${4: className=\{this.props.className\}}>
|
||||
$0
|
||||
</$3>
|
||||
);
|
||||
}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
|
|
10
init.vim
10
init.vim
|
@ -435,17 +435,13 @@ iabbrev ct'' content-type: '';
|
|||
"----------------------------------------------------------------------------}}}
|
||||
" #autocommands {{{
|
||||
|
||||
" center on insert {{{
|
||||
augroup CenterInsert
|
||||
autocmd!
|
||||
autocmd InsertEnter * norm zt
|
||||
augroup END
|
||||
|
||||
" }}}
|
||||
" template files {{{
|
||||
augroup templates
|
||||
autocmd!
|
||||
autocmd BufNewFile *.sh 0read ~/.config/nvim/templates/template.sh | normal G
|
||||
autocmd BufNewFile *.html 0read ~/.config/nvim/templates/template.html | normal gg
|
||||
autocmd BufNewFile *.css 0read ~/.config/nvim/templates/template.css | normal G
|
||||
autocmd BufNewFile *.scss 0read ~/.config/nvim/templates/template.css | normal G
|
||||
augroup END
|
||||
|
||||
" }}}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: pink;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: inherit;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE HTML>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>THE TITLE IS THIS!</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="description" content="THE DESCRIPTION IS THIS!">
|
||||
<meta name="author" content="I AM THE AUTHOR">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<header>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue